I. Introduction.
This article describes how to uninstall MariaDB on RHEL 7/CentOS 7.x. As a system administrator, sometimes you get a situation where you face the issue with the MariaDB installation and you decide to install it again. But removing only the MariaDB server package doesn’t fix the issue because old settings again affect the new installation. For this need to completely remove the MariaDB packages and remove all the old settings.
Read other related posts:
II. Prerequisites.
1. Login to your system via SSH. You can use PuTTy tool or Poderosa tool,…
2. Login with root user. If you are logged in as another user, you will need to add sudo before each command.
III. How to uninstall MariaDB on Linux – CentOS 7 step by step.
To uninstall MySQL/MariaDB on Linux – CentOS 7 folowing these steps:
Step 1. Remove MariaDB.
Step 2. Remove MariaDB Data Directory.
You can see details of Video on how to install Ansible on Linux – CentOS 7 as below.
[Sorry, the video we will update later]
Or you also can see details as below.
Step 1. Remove MariaDB.
The first step is to remove the MySQL/MariaDB package from the CentOS 7 server. Enter the command below:
sudo yum remove mysql mysql-server
Sample Output:
[root@devopsio ~]# sudo yum remove mysql mysql-server
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.1.41-1.el7.centos will be erased
---> Package MariaDB-server.x86_64 0:10.1.41-1.el7.centos will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================
Removing:
MariaDB-client x86_64 10.1.41-1.el7.centos @mariadb 52 M
MariaDB-server x86_64 10.1.41-1.el7.centos @mariadb 117 M
Transaction Summary
=====================================================================================================================================================================================================
Remove 2 Packages
Installed size: 169 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : MariaDB-server-10.1.41-1.el7.centos.x86_64 1/2
Erasing : MariaDB-client-10.1.41-1.el7.centos.x86_64 2/2
Verifying : MariaDB-client-10.1.41-1.el7.centos.x86_64 1/2
Verifying : MariaDB-server-10.1.41-1.el7.centos.x86_64 2/2
Removed:
MariaDB-client.x86_64 0:10.1.41-1.el7.centos MariaDB-server.x86_64 0:10.1.41-1.el7.centos
Complete!
Step 2. Remove MariaDB Data Directory.
By default MariaDB data directory path is /var/lib/mysql.
But instead of removing MySQL data directory we will suggest you just rename this directory to keep a backup of the old settings. You can rename this directory like old_backup_mysql.
sudo mv /var/lib/mysql /var/lib/old_backup_mysql
IV. Conclusion.
In this tutorial, we was uninstall MySQL/MariaDB on RHEL 7/CentOS 7 server. If you hit a problem or have feedback, leave a comment below.
Uninstall MariaDB on RHEL 7/CentOS 7 is complete. Wish you success and luck.
Thanks and best regards!
— Pring —
7 comments
I was wondering if you ever thought of changing the structure of your website? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or two pictures. Maybe you could space it out better?
Thankfulness to my father who told me about this web
site, this blog is truly amazing.
I really like reading an article that will make men and women think.
Also, thanks for allowing for me to comment!
This is very interesting, You are a very skilled blogger.
I have joined your feed and look forward to seeking more of your wonderful post.
Also, I have shared your website in my social networks!
I visited various web sites however the audio feature for audio songs
current at this site is genuinely excellent.
Muchas gracias. ?Como puedo iniciar sesion?
I visited many web sites but the audio quality for audio songs existing at this web site is in fact excellent. Valentine Cull Rama