As a DBA sometimes we get the task to remove MySQL installation from Server. We have to uninstall MySQL completely from the system and erase all settings of old install.
First, we need to Check that mysql is installed and server is running or stop.
Check the service is running or not.
[root@DBATrainings ~]# ps -ef | grep mysql
[root@DBATrainings ~]# sudo systemctl status mysqld
Before going to uninstall or remove the MySQL we need to stop MySQL Service.
Stop mysql service
[root@DBATrainings ~]# sudo service mysqld stop