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 completely uninstall MySQL in Linux system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to completely uninstall MySQL in the Linux system. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

1. Use the following command to check the current installation of mysql to see whether mysql rpm-qa was previously installed | ``grep``-I mysql can see the following figure:

Shows that it was previously installed:

MySQL-client-5.5.25a-1.rhel5

MySQL-server-5.5.25a-1.rhel5

2. Stop the mysql service and delete the previously installed mysql delete command: rpm-e-nodeps package name

Rpm-ev MySQL-client-5.5.25a- 1.rhel5``rpm-ev MySQL-server-5.5.25a-1.rhel5 if you are prompted for a dependency package error, try using the following command

Rpm-ev MySQL-client-5.5.25a-1.rhel5-- nodeps if the error is prompted: error:% preun (xxxxxx) scriptlet failed, exit status 1

Try it with the following command:

Rpm-e-- noscripts MySQL-client-5.5.25a-1.rhel53, find the directory of the previous version of mysql, and delete the files of the old version of mysql and the library find`` /-name mysql search results are as follows:

Find`` /-name mysql`` / var/lib/ mysql`` / var/lib/mysql/ mysql`` / usr/lib64/mysql delete the corresponding mysql directory

Rm``-rf ``/ var/lib/ mysql``rm``-rf`` / var/lib/ mysql``rm``-rf ``/ usr/lib64/mysql specific steps are shown in figure: find directory and delete

Note: / etc/my.cnf will not be deleted after uninstallation and needs to be deleted manually

Rm``-rf ``/ etc/ my``.cnf4, check again whether the machine installs mysql rpm-qa | ``grep``-I mysql this article on "how to completely uninstall MySQL on the Linux system" ends here. I hope the above content will be helpful to you so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Development

Wechat

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

12
Report