apt-get install libaio1 libmecab2 libjson-perl
下面要按顺序执行
dpkg -i mysql-common_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i libmysqlclient20_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i libmysqlclient-dev_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i libmysqld-dev_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-community-client_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-client_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-community-server_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-community-test_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-community-source_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-server_5.7.26-1ubuntu14.04_amd64.deb
dpkg -i mysql-testsuite_5.7.26-1ubuntu14.04_amd64.deb
18,20,22 的
sudo dpkg -i mysql-common_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg-preconfigure mysql-community-server_5.7.35-1ubuntu18.04_amd64.deb #此步需要输入数据的root密码
sudo dpkg -i libmysqlclient20_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-client_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-client_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-common_5.7.35-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-server_5.7.35-1ubuntu18.04_amd64.deb
如果改了目录,记得看看修改 /etc/apparmor.d/usr.sbin.mysqld 这里的 /var/lib , 重启 /etc/init.d/apparmor restart (注意如果这里是有ln关系的记得全路径也写全)