1. Delete mysql sudo apt-get autoremove--purge mysql-server-5.0 Sud o apt-get Remove mysql-server sudo apt-get autoremove mysql-server s Udo Apt-get Remove Mysql-common//This is important 2, clean up residue data dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs DPKG-P3, install mysql sudo apt-get install mysql-server sudo apt-get ins Tall mysql-client sudo apt-get install php5-mysql//install Php5-mysql connect PHP with MySQL 4, once the installation is complete, MYSQ L the server should start automatically. You can run the following command at the terminal prompt to check if the MySQL server is running: sudo netstat-tap | grep mysql5, when you run the command, you can see a line similar to the following: TCP 0 0 localhost.localdomain:mysql *:* LISTEN-6 If the server is not operating properly Yes, you can start it with the following command: sudo/etc/init.d/mysql restart7, enter mysql $mysql-uro Ot-p Administrator Password 8, configure MySQL Administrator password: &NBSp sudo mysqladmin-u root password newpassword
Ubuntu completely remove MySQL reload MySQL