每个版本可能不一样:
测试是Ubuntu 14.04版本,mysql5.7.10
官网下载wget -c http://downloads.mysql.com/archives/get/file/mysql-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar
tar -xvf ***deb-bundle.tar 大概有10+个deb包
官网顺序http://dev.mysql.com/doc/refman/5.7/en/linux-installation-debian.html
tar -xvf mysql-server_MVER-DVER_CPU.deb-bundle.tar
sudo apt-get install libaio1
sudo dpkg-preconfigure mysql-community-server_*.deb
sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb
还敲了一阵sudo apt search libaio 和sudo apt install libaio1指令
后来执行sudo apt-get -f install 解决
回退5.7到5.6.21的重装过程
删除 mysql
sudo apt-get autoremove --purge mysql-server
sudo apt-get remove mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get autoremove mysql-common
清理残留数据
dpkg -l |grep ^rc|awk '{print