Remember Centos7.x completely uninstall MariaDb database and reinstall it

1. Check the startup status of the mariadb service

[root@localhost ~]# systemctl status mariadb

2. If it is active (running), stop the service, if it is inactive (dead), then uninstall it directly

Out of service

[root@localhost ~]# systemctl stop mariadb

3. Uninstall service

[root@localhost ~]# yum remove mariadb -y

4. View the catalog

[root@localhost ~]# ls /etc/my.cnf
[root@localhost ~]# ll /var/lib/mysql/

5. Delete files and directories

[root@localhost ~]# rm -rf /etc/my.cnf
[root@localhost~]# rm -rf /var/lib/mysql/

6. Reinstall the mariadb database

https://blog.csdn.net/llwy1428/article/details/84965680

 

At this point, Centos7.x completely uninstalls the mariadb database operation is complete!

Guess you like

Origin blog.csdn.net/llwy1428/article/details/107819666