The following steps are required for Linux to uninstall Mysql data:
1. Find out the running MySQL process
ps -ef | grep mysql
2. Kill the MySQL process,
kill -9 <MySQL_Process_Id>
3. Delete the contents of the MySQL database
sudo rm -rf /var/lib/mysql
4. Delete the MySQL program file:
sudo rm -rf /usr/local/mysql
5. Delete the MySQL link file
sudo rm -rf /etc/my.cnf
Through the above 5 steps, Mysql can be uninstalled cleanly.