How to completely uninstall mysql under ubuntu

Step 1 Execute the following statements in sequence

1 sudo apt-get autoremove --purge mysql-server
2 sudo apt-get remove mysql-server
3 sudo apt-get autoremove mysql-server
4 sudo apt-get remove mysql-common

Step 2 Clean up residual data

dpkg -l |grep ^rc|awk'{print $2}' |sudo xargs dpkg -P
If the following error is reported, it proves that there are no remaining configuration files in your system, so don't worry.
Insert picture description here

Guess you like

Origin blog.csdn.net/Fengfgg/article/details/113566162