In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces several methods to completely uninstall MySQL under CentOS and shares them with you. The details are as follows:
1: check whether MySQL is installed:
Method 1:
[root@localhost usr] # yum list installed mysql*Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.yun-idc.com * extras: mirror.neu.edu.cn * updates: mirrors.yun-idc.comInstalled PackagesMySQL-client.x86_64 5.6.27-1.el6 installedMySQL-devel.x86_64 5.6.27-1.el6 installedMySQL-server.x86_64 5.6.27-1.el6 installed [root@localhost usr] #
Method 2 (- I: case-insensitive):
[root@localhost usr] # rpm-qa | grep-I mysqlMySQL-server-5.6.27-1.el6.x86_64MySQL-client-5.6.27-1.el6.x86_64MySQL-devel-5.6.27-1.el6.x86_64 [root@localhost usr] #
2: uninstall MySQL:
Uninstall 1:
[root@localhost usr] # yum remove mysql mysql-server mysql-libs compat-mysql51 [root@localhost usr] # rm-rf / var/lib/mysql [root@localhost usr] # rm / etc/my.cnf
If mysql-devel (other add command) is installed, uninstall it as follows:
The copy code is as follows:
[root@Tony_ts_tian init.d] # yum remove mysql mysql-devel mysql-server mysql-libs compat-mysql51
Note (for example):
Mysql-5.5.39-1.el6.remi.x86_64
Mysql-libs-5.5.39-1.el6.remi.x86_64
Compat-mysql51-5.1.54-1.el6.remi.x86_64
Mysql-server-5.5.39-1.el6.remi.x86_64
Uninstall 2 {continue, 1Pol 2 choose one (here for introduction):}:
[root@localhost mysql] # rpm-aq | grep-I mysqlMySQL-server-5.6.27-1.el6.x86_64MySQL-client-5.6.27-1.el6.x86_64MySQL-devel-5.6.27-1.el6.x86_64 [root@localhost mysql] # rpm-e MySQL-server-5.6.27-1.el6.x86_64 [root@localhost mysql] # rpm-e MySQL-client-5.6.27-1.el6.x86_64 [root@ Localhost mysql] # rpm-e MySQL-devel-5.6.27-1.el6.x86_64 [root@localhost rc.d] # cd / var/lib/ [root@localhost lib] # rm-rf mysql/
Note: delete the MySQL database directory (key), otherwise password will not update (default installation, if custom installation path and link path ln-s... Please delete it. )
Rm-rf / var/lib/mysql
Uninstall 3:
[root@localhost usr] # whereis mysqlmysql: / usr/lib64/mysql [root@localhost usr] # rm-rf / usr/lib64/mysql
Note: find /-name mysql
Note: clear all directories, files and other configurations and settings related to mysql. If so, delete it. It must also be considered that other software will not affect it.
Rm-rf / usr/lib/mysql
Rm-rf / usr/share/mysql
Uninstall 4:
[root@localhost usr] # rm-rf / usr/my.cnf [root@localhost usr] # rm-rf / root/.mysql_sercret
Uninstall 5 (self-starting service):
[root@localhost usr] # chkconfig-- list | grep-I mysql [root@localhost usr] # chkconfig-- del mysqld
Delete here and see your own settings: mysql/mysqld
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.