安装命令加日志:
命令总结:
1,安装命令(下面的逐一运行):
sudo apt-get install mysql-server
sudo apt-get isntall mysql-client
sudo apt-get install libmysqlclient-dev
2,检查是否安装成功:
sudo netstat -tap | grep mysql
结果截图:
日志:
zhouyi@ubuntu:~$ sudo apt-get install mysql-server
[sudo] password for zhouyi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
snapd-login-service
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libaio1 libevent-core-2.0-5 libhtml-template-perl mysql-client-5.7
mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
libaio1 libevent-core-2.0-5 libhtml-template-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, 9 newly installed, 0 to remove and 53 not upgraded.
Need to get 18.7 MB of archives.
After this operation, 161 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-common all 5.7.26- 0ubuntu0.16.04.1 [15.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-core-5.7 amd64 5.7.26-0ubuntu0.16.04.1 [6,388 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-5.7 amd64 5.7.26-0ubuntu0.16.04.1 [1,834 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-core-5.7 amd64 5.7.26-0ubuntu0.16.04.1 [7,471 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libevent-core-2.0-5 amd64 2.0.21-stable-2ubuntu0.16.04.1 [70.6 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-5.7 amd64 5.7.26-0ubuntu0.16.04.1 [2,831 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-template-perl all 2.95-2 [60.4 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server all 5.7.26- 0ubuntu0.16.04.1 [10.8 kB]
Fetched 18.7 MB in 10s (1,756 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 216512 fi