Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to uninstall MySQL from Linux

2025-02-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to uninstall MySQL from Linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to uninstall MySQL with Linux.

Find out whether mysqlshell > rpm-qa is installed | grep mysqlmysql-libs-5.1.73-3.el6_5.i686mysql-server-5.1.73-3.el6_5.i686mysql-5.1.73-3.el6_5.i686mysql-connector-odbc-5.1.5r1144-7.el6.i686 stop the mysql service and delete mysqlshell > / etc/init.d/mysqld stop stop mysqld: [ OK] shell > rpm-ev mysql-server-5.1.73-3.el6_5.i686shell > rpm-ev mysql-5.1.73-3.el6_5.i686shell > rpm-ev mysql-connector-odbc-5.1.5r1144-7.el6.i686shell > rpm-e-- nodeps mysql-libs-5.1.73-3.el6_5.i686 # #-- nodeps forcefully deletes mysql directory files and libraries shell > find /-name mysql/usr/lib/perl5/auto / DBD/mysql/usr/lib/perl5/DBD/mysql/var/lib/mysql/var/lib/mysql/mysqlshell > rm-rf / var/lib/mysqlshell > rm-rf / etc/my.cnf # will not be deleted after uninstalling / etc/my.cnf Need to delete manually

You can also use the locate command to query, which searches not for a specific directory, but for a file database (/ var/lib/locatedb) that contains all the local file information. The Linux system automatically creates this database and automatically updates it once a day, so you can't find the most recently changed files using the locate command. To avoid this, you can manually update the database using the updatedb command before using locate

Delete mysql users and groups shell > id mysqluid=27 (mysql) gid=27 (mysql) Group = 27 (mysql) shell > userdel mysqlshell > groupdel mysqlshell > cat / etc/passwd | grep mysql # verify whether users are deleted shell > cat / etc/group | grep mysq # verify that user groups are deleted and check again to see if mysqlshell > rpm-qa exists | grep-I mysqlshell > updatedbshell > locate mysql

No result, which means that it has been completely uninstalled, and then you can install mysql directly.

At this point, I believe you have a deeper understanding of "Linux how to uninstall MySQL". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report