Home » MariaDB: Uninstall MariaDB on Linux – CentOS 7/RHEL 7

MariaDB: Uninstall MariaDB on Linux – CentOS 7/RHEL 7

by Pring
MariaDB: Uninstall MariaDB on Linux – CentOS 7/RHEL 7

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 —

Related Articles

7 comments

vurtilopmer December 1, 2019 - 4:16 pm

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?

Reply
cialis online purchase May 30, 2020 - 10:15 pm

Thankfulness to my father who told me about this web
site, this blog is truly amazing.

Reply
바카라 October 15, 2020 - 5:08 pm

I really like reading an article that will make men and women think.
Also, thanks for allowing for me to comment!

Reply
더킹카지노 October 16, 2020 - 9:34 am

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!

Reply
바카라사이트 October 20, 2020 - 3:27 pm

I visited various web sites however the audio feature for audio songs
current at this site is genuinely excellent.

Reply
gycfsuznog November 8, 2020 - 2:47 pm

Muchas gracias. ?Como puedo iniciar sesion?

Reply
720p December 10, 2020 - 5:39 am

I visited many web sites but the audio quality for audio songs existing at this web site is in fact excellent. Valentine Cull Rama

Reply

Leave a Comment