Uninstalling MySQL (Against Installation of the RPM Package from the Mirror Site)
Select an uninstallation mode based on your installation mode. If MySQL is installed using an RPM package from the mirror site, uninstall it by following the instructions in this section.
- Check the database process.
1ps -ef | grep mysql
- Stop the database process.
1/usr/local/mysql/bin/mysqladmin -uroot -p123456 shutdown -S /data/mysql/run/mysql.sock
Or
1kill -9 process_ID
- Exit the mysql user.
exit whoami
- Uninstall the database RPM package.
1 2 3
rpm -qa | grep mysql rpm -e mysql-8.0.17-1.el7.aarch64 rpm -qa | grep mysql
- Delete the installation directory and data directory.
1 2 3 4
ls /usr/local/mysql rm -rf /usr/local/mysql ls /data/mysql rm -rf /data/mysql
Parent topic: Uninstalling MySQL