0

How To Completely Remove MariaDB package On CentOS 7.6

Hello,I am novice to CentOS 7.6.I just want to know how to delete the MAriaDB package completely On CentOS 7.6.What are the files to be deleted?

noah
asked May 14, 2019
1 Answer
0

query and list the rpm packages on MariaDB
rpm -qa | grep "MariaDB"
Go to the location of Repositories and check for the MariaDB repo
cd /etc/yum.repos.d/
Disable mariaDB if repo is present or else skip 2 and 3 steps.
yum-config-manager --disableMariaDB
Remove the MariaDB rpm packages
yum remove "MariaDB*" -y
Remove forcefully the configuration of MariaDB
rm -rf /etc/my.cnf
Remove Data Directory
rm -rf /var/lib/mysql
search for the mysql user in the /etc/passwd location.
grep mysql /etc/passwd
Delete the user mysql using the below command.
userdel -r mysql
Check whether could you login to the MariaDB.If it says like no such file or directory ,its Ok.
mysql -u root -p
check the status of MariaDB ,If it throws no command is found ,then we have successfully removed MariaDB completely On CentOS 7.6
systemctl status mariadb

Thus the procedure comes to end.

View More
linuxhelp
answered May 14, 2019
Your Answer
||||
x
 
100:0