1.从oracle官网下载mysql安装包。
mysql-server_5.7.18-1ubuntu16.04_amd64.deb-bundle.tar
2.解压缩安装包。
tar -xf mysql-server_5.7.18-1ubuntu16.04_amd64.deb-bundle.tar
3.使用root用户执行命令安装。
dpkg -i mysql-common_5.7.18-1ubuntu16.04_amd64.deb mysql-community-client_5.7.18-1ubuntu16.04_amd64.deb libmysqlclient20_5.7.18-1ubuntu16.04_amd64.deb libmysqlclient-dev_5.7.18-1ubuntu16.04_amd64.deb libmysqld-dev_5.7.18-1ubuntu16.04_amd64.deb mysql-client_5.7.18-1ubuntu16.04_amd64.deb mysql-community-server_5.7.18-1ubuntu16.04_amd64.deb
4.报错如下。
root@ubuntu:~$ dpkg -i mysql-common_5.7.18-1ubuntu16.04_amd64.deb mysql-community-client_5.7.18-1ubuntu16.04_amd64.deb libmysqlclient20_5.7.18-1ubuntu16.04_amd64.deb libmysqlclient-dev_5.7.18-1ubuntu16.04_amd64.deb libmysqld-dev_5.7.18-1ubuntu16.04_amd64.deb mysql-client_5.7.18-1ubuntu16.04_amd64.deb mysql-community-server_5.7.18-1ubuntu16.04_amd64.deb
Selecting previously unselected package mysql-common.
(Reading database ... 207638 files and directories currently installed.)
Preparing to unpack mysql-common_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking mysql-common (5.7.18-1ubuntu16.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack mysql-community-client_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking mysql-community-client (5.7.18-1ubuntu16.04) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack libmysqlclient20_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.18-1ubuntu16.04) ...
Selecting previously unselected package libmysqlclient-dev.
Preparing to unpack libmysqlclient-dev_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking libmysqlclient-dev (5.7.18-1ubuntu16.04) ...
Selecting previously unselected package libmysqld-dev.
Preparing to unpack libmysqld-dev_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking libmysqld-dev (5.7.18-1ubuntu16.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack mysql-client_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking mysql-client (5.7.18-1ubuntu16.04) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack mysql-community-server_5.7.18-1ubuntu16.04_amd64.deb ...
Unpacking mysql-community-server (5.7.18-1ubuntu16.04) ...
Setting up mysql-common (5.7.18-1ubuntu16.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
dpkg: dependency problems prevent configuration of mysql-community-client:
mysql-community-client depends on libaio1 (>= 0.3.93); however:
Package libaio1 is not installed.
dpkg: error processing package mysql-community-client (--install):
dependency problems - leaving unconfigured
Setting up libmysqlclient20:amd64 (5.7.18-1ubuntu16.04) ...
Setting up libmysqlclient-dev (5.7.18-1ubuntu16.04) ...
Setting up libmysqld-dev (5.7.18-1ubuntu16.04) ...
dpkg: dependency problems prevent configuration of mysql-client:
mysql-client depends on mysql-community-client (= 5.7.18-1ubuntu16.04); however:
Package mysql-community-client is not configured yet.
dpkg: error processing package mysql-client (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-community-server:
mysql-community-server depends on mysql-client (= 5.7.18-1ubuntu16.04); however:
Package mysql-client is not configured yet.
mysql-community-server depends on libaio1 (>= 0.3.93); however:
Package libaio1 is not installed.
mysql-community-server depends on libmecab2 (>= 0.996-1.2ubuntu1); however:
Package libmecab2 is not installed.
dpkg: error processing package mysql-community-serv