I used to configure the service environment for testing on the server. I was too lazy to install it using an online ready-made script. As a result, MySQL cannot be started, so I only had to honestly reinstall MySQLServer, I thought that commands like apt-get -- purge could help me solve this problem, so I re-installed sudoapt-get -- p through the following command:
I used to configure the service environment for testing on the Server. I was too lazy to install it with an online ready-made script. As a result, MySQL cannot be started, so I only had to honestly reinstall the MySQL Server, I thought that commands like apt-get -- purge could help me solve this problem, so I re-installed sudo apt-get -- p through the following command:
I used to configure the service environment for testing on the Server. I was lazy and used an online ready-made script for installation. As a result, MySQL cannot be started, so I only had to honestly reinstall MySQL Server.apt-get --purge
This type of command can help me solve this problem, so I re-install it through the following command:
sudo apt-get --purge remove mysql-serversudo apt-get install mysql-server
When MySQL is started again, an error is still returned. The search network still prompts you to reinstall the MySQL service program. It seems that the uninstall command above cannot properly clean up the installation residue, finally, I found this article MySQL Problems-a complete reinstall. You have found a way to completely clean up and uninstall MySQL, which is recorded here for your note.
First, you can usedpkg --get-selections | grep mysql
Run the following command to list the MySQL-related software installed on your computer and then uninstall purge:
sudo apt-get --purge remove mysql-serversudo apt-get --purge remove mysql-clientsudo apt-get --purge remove mysql-common
Finally, run the following command to clear the residue:
apt-get autoremoveapt-get autocleanrm /etc/mysql/ -Rrm /var/lib/mysql/ -R
Now, all the uninstallation and cleanup work has been completed. You can reinstall it :-)
Related posts:
- Blog basic resume
- Solve the problem that the sudo command unable to initialize PAM In Debian
- Install Nginx + MySQL + PHPMyAdmin with apt-get In Debian
Original article address: Debian completely uninstalls and cleans up and reinstalls the MySQL server. Thank you for sharing it with the original author.