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 gracefully uninstall MySQL by Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today, I would like to share with you how Linux gracefully uninstalls MySQL related knowledge points, the content is detailed, the logic is clear, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's take a look at it.

Use the following command to check the current installation of mysql to find out whether mysql was previously installed

Rpm-qa | ``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 files and libraries of the previous version of mysql

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 mysql is installed on the machine

Rpm-qa | ``grep``-I mysql above is all the content of this article "how to uninstall MySQL gracefully by Linux". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

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