视频地址

原文章地址

下载mysql源

  1. 打开mysql官网

    mysql官网文档





    进入下载地址页面

  2. 下载mysql源

    apt-get install -y wget #如果没有wget命令就安装一下

    wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb

    dpkg -i mysql-apt-config_0.8.15-1_all.deb

    选择1,2,4

root@7c609eaf61d3:/usr/local/src# dpkg -i mysql-apt-config_0.8.15-1_all.deb
(Reading database ... 8304 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.15-1_all.deb ...
Unpacking mysql-apt-config (0.8.15-1) over (0.8.15-1) ...
Setting up mysql-apt-config (0.8.15-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Configuring mysql-apt-config
---------------------------- MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version
that you wish to receive. Once you are satisfied with the configuration then select last option 'Ok' to save the configuration, then run 'apt-get update' to load
package list. Advanced users can always change the configurations later, depending on their own needs. 1. MySQL Server & Cluster (Currently selected: mysql-8.0) 3. MySQL Preview Packages (Currently selected: Disabled)
2. MySQL Tools & Connectors (Currently selected: Enabled) 4. Ok
Which MySQL product do you wish to configure? 1 This configuration program has determined that mysql-8.0 is configured on your system, and has highlighted the most appropriate repository
package. If you are not sure which version to install, do not change the auto-selected version. Advanced users can always change the
version as needed later. Note that MySQL Cluster also contains MySQL Server. 1. mysql-5.7 2. mysql-8.0 3. mysql-cluster-7.5 4. mysql-cluster-7.6 5. mysql-cluster-8.0 6. None
Which server version do you wish to receive? 2 MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version
that you wish to receive. Once you are satisfied with the configuration then select last option 'Ok' to save the configuration, then run 'apt-get update' to load
package list. Advanced users can always change the configurations later, depending on their own needs. 1. MySQL Server & Cluster (Currently selected: mysql-8.0) 3. MySQL Preview Packages (Currently selected: Disabled)
2. MySQL Tools & Connectors (Currently selected: Enabled) 4. Ok
Which MySQL product do you wish to configure? 4 Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK
  apt-get update #更新mysql源
注意看一下是否更新成功,有时候会出现connect time out,多试几次就可以了
apt-get install mysql-server #安装mysql
输入密码 123456
确认密码 123456
选 1. Use Strong Password Encryption (RECOMMENDED) #选择1强密码加密 安装完成后,官网说直接使用service就可以启动,service mysql start,但是我这里报找不到这个service启动脚本。
因为在/etc/init.d/目录里没有这个mysql的启动命令
使用mysqld来启动,直接使用mysqld命令启动,报错不允许使用root用户执行
[Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 使用mysql用户执行
mysqld --user=mysql & #启动并后台运行
ps aux | grep mysql #查看已经启动了mysqld
kill 进程号可以停止mysql服务
mysql -uroot -p
输入密码123456
show databases; #查看现有的库
root@7c609eaf61d3:/etc/init.d# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.21 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec) mysql> exit #退出msyql
  whereis mysql #查看mysql安装的位置

到此已经成功安装上8.0.21 MySQL

ubuntu系统下安装最新版的MySQL的更多相关文章

  1. [视频教程] ubuntu系统下安装最新版的MySQL

    视频地址: https://www.bilibili.com/video/av69256331/ 官网文档https://dev.mysql.com/doc/mysql-apt-repo-quick- ...

  2. [视频教程] ubuntu系统下安装最新版PHP7.3.X环境

    视频地址: https://www.bilibili.com/video/av69088870/ 笔记: 先安装一下这个命令 add-apt-repositoryapt-get install sof ...

  3. ubuntu系统下安装pyspider:搭建pyspider服务器新手教程

    首先感谢“巧克力味腺嘌呤”的博客和Debian 8.1 安装配置 pyspider 爬虫,本人根据他们的教程在ubuntu系统中进行了实际操作,发现有一些不同,也出现了很多错误,因此做此教程,为新手服 ...

  4. Ubuntu系统下安装并配置hive-2.1.0

    说在前面的话 默认情况下,Hive元数据保存在内嵌的Derby数据库中,只能允许一个会话连接,只适合简单的测试.实际生产环境中不使用,为了支持多用户会话, 则需要一个独立的元数据库,使用MySQL作为 ...

  5. CentOS和Ubuntu系统下安装 HttpFS (助推Hue部署搭建)

    不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...

  6. ubuntu系统下安装pip3及第三方库的安装

    ubuntu系统下会自带python2.x和python3.x坏境,不需要我们去安装.并且ubuntu系统下还会自动帮助我们安装python2.x坏境下的pip安装工具, 但是没有python3.x坏 ...

  7. ubuntu系统下安装pyspider:安装命令集合。

    本篇内容的前提是你已安装好python 3.5.在ubuntu系统中安装pyspider最大的困难是要依赖组件经常出错,特别是pycurl,但把对应的依赖组件安装好,简单了.下面直接上代码,所有的依赖 ...

  8. CentOS和Ubuntu系统下安装vsftp(助推大数据部署搭建)

    不多说,直接上干货! 同时,声明,我这里安装的vsftp,仅仅只为我的大数据着想,关于网上的复杂安装,那是服务和运维那块.我不多牵扯,也不多赘述. 一.CentOS系统里安装vsftp 第一步:使用y ...

  9. Python 基础之在ubuntu系统下安装双版本python

    前言:随着python升级更新,新版本较于老版本功能点也有不同地方,作为一个初学者应该了解旧版本的规则,也要继续学习新版本的知识.为了能更好去学习python,我在ubuntu安装python2和py ...

  10. ubuntu系统下安装gstreamer的ffmpeg支持

    当您在安装gstreamer到您的ubuntu系统中时,为了更好地进行流媒体开发,需要安装ffmpeg支持,但一般情况下,直接使用 sudo apt-get install gstreamer0.10 ...

随机推荐

  1. Python---json数据格式详解

    什么是JSON JSON是一种取代XML的数据结构,和xml相比,它更小巧但描述能力却不差,由于它的小巧所以网络传输数据将减少更多流量从而加快速度. 那么,JSON到底是什么? JSON就是一串字符串 ...

  2. #dp,齐肯多夫定理#CF126D Fibonacci Sums

    题目 \(T(T\leq 10^5)\) 组数据,每次给定数字 \(n(n\leq 10^{18})\), 问有多少种方案将 \(n\) 分解成若干个互不相同的斐波那契数 分析 如果找到一个方案使得所 ...

  3. #最大流#WOJ 124 Football Coach

    题目 有\(n\)支球队,互相之间已经进行了一些比赛.现在还有\(m\)场比赛未进行, 每场比赛胜者得2分,平局各得1分,负者不得分. 问是否存在一种方法使得球队\(n\)的得分比其他\(n-1\)支 ...

  4. ubuntu环境下因pie选项导致双击启动失败的问题

    在ubuntu环境下,链接可执行文件时增加-pie选项,双击可执行程序,无法正常启动. 对于这个现象,stackoverflow有个帖子,gcc creates mime type applicati ...

  5. HMS Core助力同程旅行,打造更贴心的用户出行体验

    作为中国在线旅行行业的创新者,同程旅行聚焦年轻.时尚.个性的消费群体,致力于为用户提供更便捷.聪明.安全的出行服务.近年来,同程旅行通过人工智能等创新科技的应用将平台原本的交易撮合角色转变为" ...

  6. 京东一面:如何在SpringBoot启动时执行特定代码?有哪些方式?

    引言 Spring Boot 提供了许多便捷的功能和特性,使得开发者可以更加轻松地构建强大.高效的应用程序.然而,在应用程序启动时执行一些初始化操作是至关重要的,它可以确保应用程序在启动后处于预期的状 ...

  7. nginx重新整理——————分析log数据[六]

    前言 简单介绍一下goaccess. 正文 安装: yum install epel-release yum install GeoIP GeoIP-devel GeoIP-data yum inst ...

  8. Webpack中常见的Loader?解决了什么问题?

    一.是什么 loader 用于对模块的源代码进行转换,在 import 或"加载"模块时预处理文件 webpack做的事情,仅仅是分析出各种模块的依赖关系,然后形成资源列表,最终打 ...

  9. 日志架构演进:从集中式到分布式的Kubernetes日志策略

    当我们没有使用云原生方案部署应用时采用的日志方案往往是 ELK 技术栈. 这套技术方案比较成熟,稳定性也很高,所以几乎成为了当时的标配. 可是随着我们使用 kubernetes 步入云原生的时代后, ...

  10. WPF/C#:如何显示具有层级关系的数据

    前言 比方说我们有以下两个类: public class Class { public string? Name { get; set; } public List<Student>? S ...