1$ sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
2$ sudo apt-get autoremove -y
3$ sudo apt-get autoclean
4$ sudo rm -rf /etc/mysql
5# Delete all MySQL files on your server:
6$ sudo find / -iname 'mysql*' -exec rm -rf {} \;
1sudo systemctl stop mysql
2
3sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
4
5sudo rm -rf /etc/mysql /var/lib/mysql
1sudo apt-get remove --purge mysql* -y
2sudo apt-get autoremove -y
3sudo apt-get autoclean