重装mysql ubuntu的方法

1,198 阅读1分钟

UNINSTALL OR COMPLETELY REMOVE MYSQL FROM UBUNTU 16-04 While upgrading from ubuntu 16.04.1 to ubuntu 16.04.03, we had face once issue that we unexpected.

This incident are cause by mysql server update, while setting up the mysql by apt, its hang on the server and will not work for leaving it around one hours.

So we decide to remove the mysql server and reinstall again, below are the step that we were done.

sudo apt-get remove --purge mysql*
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
sudo apt-get dist-upgrade
sudo apt-get install mysql-server

if still not working for you, please check any mysql process running on your server, it can be view by using top command and service mysql stop, otherwise try step3 before going through step 1 and 2.