ubuntu16.04离线安装mysql5.7
一:首先要下载离线包:mysql-server_5.7.28-1ubuntu16.04_amd64.deb-bundle.tar
解压:tar -xvf mysql-xxxx.tar
按以下顺序安装(版本号可能不同):
dpkg -i mysql-common_5.7.28-1ubuntu16.04_amd64.deb dpkg -i libmysqlclient20_5.7.28-1ubuntu16.04_amd64.deb dpkg -i libmysqlclient-dev_5.7.28-1ubuntu16.04_amd64.deb dpkg -i libmysqld-dev_5.7.28-1ubuntu16.04_amd64.deb dpkg -i mysql-community-client_5.7.28-1ubuntu16.04_amd64.deb dpkg -i mysql-client_5.7.28-1ubuntu16.04_amd64.deb dpkg -i mysql-community-source_5.7.28-1ubuntu16.04_amd64.deb dpkg -i mysql-community-server_5.7.28-1ubuntu16.04_amd64.deb
二:报错解决:
1)dpkg -i mysql-community-client_5.7.28-1ubuntu16.04_amd64.deb
dpkg: 依赖关系问题使得 mysql-community-client 的配置工作不能继续:
mysql-community-client 依赖于 libaio1 (>= 0.3.93);然而: 未安装软件包 libaio1。
下载libaio1_0.3.110-2_amd64.deb,然后安装
dpkg -i libaio1_0.3.110-2_amd64.deb
2)dpkg -i dpkg -i mysql-community-server_5.7.28-1ubuntu16.04_amd64.deb
dpkg: 依赖关系问题使得 mysql-community-server 的配置工作不能继续:
mysql-community-server 依赖于 libmecab2 (>= 0.996-1.2ubuntu1);然而: 未安装软件包 libmecab2
下载libmecab2_0.996-1.2ubuntu1_amd64.deb,然后安装:
dpkg -i libmecab2_0.996-1.2ubuntu1_amd64.deb
三:再次dpkg mysql-community-server 输入密码:123456 后完成安装