📜  cent os mariadb remove complete (1)

📅  最后修改于: 2023-12-03 14:59:54.366000             🧑  作者: Mango

Cent OS Mariadb Remove Complete

If you are looking to completely remove Mariadb from your Cent OS system, this guide will help you do it the right way.

Step 1: Stop the Mariadb Service

The first step is to stop the Mariadb service.

sudo systemctl stop mariadb
Step 2: Remove the Mariadb Packages

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
Step 3: Delete the Mariadb Data Directory

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/
Step 4: Remove the Mariadb Configuration Files

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.

Conclusion

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.