Before the Server Configuration Test service environment, I lazy easy to use the online ready-made script to install, the result of MySQL can not start, so I only honestly reinstall MySQL Server, originally thought Apt-get--purge this kind of command can very good help me solve this problem, So I reinstall it through the following command:
Copy Code code as follows:
sudo apt-get--purge Remove Mysql-server
sudo apt-get install Mysql-server
Then again the start of MySQL, still fail to report the error, the search network is still prompted to reinstall the MySQL service program, it seems that the above uninstall command can not be very good clean-up installation remnants, and finally found such an article "MySQL problems–a complete Reinstall." Found a complete cleanup uninstall clean MySQL method, recorded here for the memo.
First you can pass dpkg--get-selections | The grep mysql command lists the MySQL-related software installed on your computer and then purge uninstall, which is what I did:
Copy Code code as follows:
sudo apt-get--purge Remove Mysql-server
sudo apt-get--purge Remove mysql-client
sudo apt-get--purge Remove Mysql-common
Finally, the remainder is cleared through the following command:
Copy Code code as follows:
Apt-get Autoremove
Apt-get AutoClean
rm/etc/mysql/-R
rm/var/lib/mysql/-R
All right, so uninstall cleanup is complete, and the following can be reinstalled:-)