📅  最后修改于: 2023-12-03 14:59:54.366000             🧑  作者: Mango
If you are looking to completely remove Mariadb from your Cent OS system, this guide will help you do it the right way.
The first step is to stop the Mariadb service.
sudo systemctl stop mariadb
Next, you need to remove the Mariadb packages from your system. You can do this using the following command:
sudo yum remove mariadb mariadb-server
After the packages are removed, you need to delete the Mariadb data directory. By default, this directory is located at /var/lib/mysql/
. You can delete it using the following command:
sudo rm -rf /var/lib/mysql/
The last step is to remove the Mariadb configuration files. You can do this using the following command:
sudo rm /etc/my.cnf
sudo rm -rf /etc/my.cnf.d/
That's it! You have successfully removed Mariadb from your Cent OS system.
In this guide, you have learned how to remove Mariadb from your Cent OS system. By following these steps, you can ensure that Mariadb is completely removed from your system without leaving any remnants behind.