要专业地卸载MySQL,请遵循以下步骤:
mysqldump
命令来完成这个操作。mysqldump -u [username] -p[password] --all-databases > backup.sql
sudo service mysql stop
sudo systemctl stop mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo yum remove mysql-server mysql-client mysql-common
/etc/mysql/
/var/lib/mysql/
/var/log/mysql/
你可以使用rm
命令来删除这些文件和目录:
sudo rm -rf /etc/mysql/
sudo rm -rf /var/lib/mysql/
sudo rm -rf /var/log/mysql/
find
命令来查找这些文件:sudo find / -iname "*mysql*" -type f -delete
sudo find / -iname "*mysql*" -type d -delete
sudo apt-get update
sudo yum update
现在你已经成功地专业地卸载了MySQL。如果需要,你可以随时按照上述步骤重新安装MySQL。