一 下载安装 MySQL
下载 MySQL,创建文件存放路径:mkdir software/data/mysql
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server
baicun@ubuntu1:~/software/data/mysql$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca
The following NEW packages will be installed:
libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7
mysql-server-core-5.7
0 upgraded, 21 newly installed, 0 to remove and 59 not upgraded.
Need to get 21.0 MB of archives.
After this operation, 162 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7,308 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libaio1 amd64 0.3.110-5 [6,448 B]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64 5.7.23-0ubuntu0.18.04.1 [6,985 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64 5.7.23-0ubuntu0.18.04.1 [6,985 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-5.7 amd64 5.7.23-0ubuntu0.18.04.1 [2,312 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-server-core-5.7 amd64 5.7.23-0ubuntu0.18.04.1 [7,777 kB]
Ign:5 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-server-core-5.7 amd64 5.7.23-0ubuntu0.18.04.1
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-server-5.7 amd64 5.7.23-0ubuntu0.18.04.1 [3,194 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhtml-tagset-perl all 3.20-3 [12.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 liburi-perl all 1.73-1 [77.2 kB]