MySQL - Ubuntu

MySQL 8 安装

MySQL APT Repository

APT 地址:https://dev.mysql.com/downloads/repo/apt/

Ubuntu 内下载命令:wget https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ubuntu@VM-0-16-ubuntu:~$ wget https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb
--2020-06-05 09:23:21-- https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb
Resolving repo.mysql.com (repo.mysql.com)... 23.199.73.25
Connecting to repo.mysql.com (repo.mysql.com)|23.199.73.25|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 35532 (35K) [application/x-debian-package]
Saving to: ‘mysql-apt-config_0.8.15-1_all.deb’

mysql-apt-config_0.8.15-1_all 100%[=================================================>] 34.70K 82.2KB/s in 0.4s

2020-06-05 09:23:29 (82.2 KB/s) - ‘mysql-apt-config_0.8.15-1_all.deb’ saved [35532/35532]

ubuntu@VM-0-16-ubuntu:~$ ls
mysql-apt-config_0.8.15-1_all.deb
1
2
3
4
5
6
7
8
ubuntu@VM-0-16-ubuntu:~$ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
Selecting previously unselected package mysql-apt-config.
(Reading database ... 77010 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) ...
Setting up mysql-apt-config (0.8.15-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ubuntu@VM-0-16-ubuntu:~$ sudo apt update
Hit:1 http://mirrors.tencentyun.com/ubuntu bionic InRelease
Hit:2 http://mirrors.tencentyun.com/ubuntu bionic-security InRelease
Hit:3 http://mirrors.tencentyun.com/ubuntu bionic-updates InRelease
Get:4 http://repo.mysql.com/apt/ubuntu bionic InRelease [19.4 kB]
Get:5 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 Sources [946 B]
Get:6 http://repo.mysql.com/apt/ubuntu bionic/mysql-apt-config i386 Packages [563 B]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-apt-config amd64 Packages [563 B]
Get:8 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 Packages [7,605 B]
Get:9 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 i386 Packages [7,606 B]
Get:10 http://repo.mysql.com/apt/ubuntu bionic/mysql-tools i386 Packages [4,749 B]
Get:11 http://repo.mysql.com/apt/ubuntu bionic/mysql-tools amd64 Packages [5,331 B]
Fetched 46.8 kB in 4s (11.8 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
153 packages can be upgraded. Run 'apt list --upgradable' to see them.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ubuntu@VM-0-16-ubuntu:~$ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
linux-modules-4.15.0-29-generic
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libaio1 libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core
mysql-community-server mysql-community-server-core
The following NEW packages will be installed:
libaio1 libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core
mysql-community-server mysql-community-server-core mysql-server
0 upgraded, 12 newly installed, 0 to remove and 153 not upgraded.
Need to get 35.7 MB of archives.
After this operation, 249 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ubuntu@VM-0-16-ubuntu:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
linux-modules-4.15.0-29-generic
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libaio1 libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core
mysql-community-server mysql-community-server-core
The following NEW packages will be installed:
libaio1 libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core
mysql-community-server mysql-community-server-core mysql-server
0 upgraded, 12 newly installed, 0 to remove and 153 not upgraded.
Need to get 35.7 MB of archives.
After this operation, 249 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrors.tencentyun.com/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6,476 B]
Get:2 http://mirrors.tencentyun.com/ubuntu bionic/universe amd64 libmecab2 amd64 0.996-5 [257 kB]
Get:3 http://mirrors.tencentyun.com/ubuntu bionic/universe amd64 mecab-utils amd64 0.996-5 [4,856 B]
Get:4 http://mirrors.tencentyun.com/ubuntu bionic/universe amd64 mecab-ipadic all 2.7.0-20070801+main-1 [12.1 MB]
Get:5 http://mirrors.tencentyun.com/ubuntu bionic/universe amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-1 [3,522 B]
Get:6 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-common amd64 8.0.20-1ubuntu18.04 [94.3 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client-core amd64 8.0.20-1ubuntu18.04 [1,707 kB]
Get:8 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.20-1ubuntu18.04 [2,834 kB]
44% [8 mysql-community-client 57.6 kB/2,834 kB 2%]