In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to uninstall mysql completely in CentOS, I believe many inexperienced people are helpless about this, for this reason this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.
Check if MySQL is installed.
Mode 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
Unloading 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 is installed (the same as add command), uninstall is:
[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
Unload2 {Continue, 1, 2 Select one (here is an 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 MySQL database directory (key), otherwise password will not be updated (default installation, if custom installation path and link path ln -s …please delete.)
rm -rf /var/lib/mysql
Unloading 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 related to mysql, as well as files and other configurations and settings. If so, delete it. Other software must also be considered not to be affected.
rm -rf /usr/lib/mysqlrm -rf /usr/share/mysql
Unloading 4:
[root@localhost usr]# rm -rf /usr/my.cnf[root@localhost usr]# rm -rf /root/.mysql_sercret
Uninstall 5 (Self-Start Service):
[root@localhost usr]# chkconfig --list | grep -i mysql[root@localhost usr]# chkconfig --del mysqld
The requested URL/mysql/was not found on this server.
After reading the above, do you know how to uninstall mysql completely in CentOS? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
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.