How to uninstall MySQL 5.7 on CentOS7

How to uninstall MySQL 5.7 on CentOS7

Check what is installed in mysql

rpm -qa | grep -i mysql

If a null value is returned, it means that mysql is not installed.

If the following situation is returned, it means that mysql

uninstall

yum remove mysql-community-common-5.7.27-1.el7.x86_64
yum remove mysql57-community-release-el7-8.noarch
yum remove mysql-community-server-5.7.27-1.el7.x86_64
yum remove mysql-community-client-5.7.27-1.el7.x86_64
yum remove mysql-community-libs-5.7.27-1.el7.x86_64

Check whether it is uninstalled cleanly

rpm -qa | grep -i mysql

Find the directory of mysql

find / -name mysql

delete

rm -rf /usr/lib64/mysql
rm -rf /usr/share/mysql
...

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

rm -rf /etc/my.cnf 

Delete /var/log/mysqld.log (If you do not delete this file, the newly installed mysql will not be able to save the new password, resulting in failure to log in)

rm -rf /var/log/mysqld.log

This is the end of this article about how to uninstall MySQL 5.7 on CentOS 7. For more information about how to uninstall MySQL 5.7 on CentOS 7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Linux CentOS 6.5 Uninstall, tar and install MySQL tutorial
  • CentOS7.x uninstall and install MySQL5.7 operation process and encoding format modification method
  • How to completely uninstall mysql under CentOS
  • Several methods to completely uninstall MySQL under CentOS

<<:  Windows DNS server exposed "worm-level" vulnerability, has existed for 17 years

>>:  React.js framework Redux basic case detailed explanation

Recommend

Detailed tutorial on running Tomcat in debug mode in IDEA Maven project

1. Add the following dependencies in pom.xml <...

Solution to the problem of installing MySQL compressed version zip

There was a problem when installing the compresse...

Manjaro installation CUDA implementation tutorial analysis

At the end of last year, I replaced the opensuse ...

Detailed Tutorial on Installing MySQL 5.7 on RedHat 6.5

RedHat6.5 installation MySQL5.7 tutorial sharing,...

mysql replace part of the field content and mysql replace function replace()

[mysql] replace usage (replace part of the conten...

MySQL 5.6 zip package installation tutorial detailed

Previously, we all used files with the suffix .ms...

MySQL slow log online problems and optimization solutions

MySQL slow log is a type of information that MySQ...

Detailed explanation of docker version es, milvus, minio startup commands

1. es startup command: docker run -itd -e TAKE_FI...

MySQL 8.0.3 RC is about to be released. Let’s take a look at the changes

MySQL 8.0.3 is about to be released. Let’s take a...

Example of stars for CSS rating effect

What? What star coat? Well, let’s look at the pic...