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

centos7.2 offline installation mysql5.7.18.tar.gz

Because of network isolation, MySQL cannot be ins...

Three principles of efficient navigation design that web designers must know

Designing navigation for a website is like laying...

Introduction to CSS3 color value RGBA and gradient color usage

Before CSS3, gradient images could only be used a...

How does MySQL achieve master-slave synchronization?

Master-slave synchronization, also called master-...

Mobile front-end adaptation solution (summary)

I searched online and found that many interviews ...

Detailed process of installing the docker plugin in IntelliJ IDEA (2018 version)

Table of contents 1. Development Environment 2. I...

Integration practice of Vue+Element background management framework

Table of contents Vue+ElementUI background manage...

Detailed explanation of the practical application of centos7 esxi6.7 template

1. Create a centos7.6 system and optimize the sys...

A detailed tutorial on using Docker to build a complete development environment

Introduction to DNMP DNMP (Docker + Nginx + MySQL...

Postman automated interface testing practice

Table of contents Background Description Creating...

A brief discussion on the magical uses of CSS pseudo-elements and pseudo-classes

CSS plays a very important role in a web page. Wi...