How to uninstall MySQL 8.0 version under Linux

How to uninstall MySQL 8.0 version under Linux

1. Shut down MySQL

[root@localhost /]# service mysqld stop
Redirecting to /bin/systemctl stop mysqld.service

2. Check the current installation of MySQL and find out whether MySQL was installed before

[root@localhost /]# rpm -qa|grep -i mysql
mysql-community-client-8.0.13-1.el7.x86_64
mysql-community-libs-8.0.13-1.el7.x86_64
mysql-community-common-8.0.13-1.el7.x86_64
mysql-community-server-8.0.13-1.el7.x86_64

3. Execute the command to delete the installed MySQL

[root@localhost /]# rpm -ev mysql-community-client-8.0.13-1.el7.x86_64

Error:

error: Failed dependencies:
mysql-community-client(x86-64) >= 8.0.0 is needed by (installed) mysql-community-server-8.0.13-1.el7.x86_64

The reason is that the dependency package is wrong. Execute the following command to solve it:

[root@localhost /]# rpm -ev mysql-community-client-8.0.13-1.el7.x86_64 --nodeps

The remaining ones are also executed according to the above operations, plus --nodeps

Then execute the # rpm -qa|grep -i mysql command to check whether the deletion is successful.

Four: Check the directory of the previously installed MySQL and delete it

[root@localhost /]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
/usr/share/mysql
[root@localhost /]# rm -rf /var/lib/mysql
[root@localhost /]# rm -rf /var/lib/mysql/mysql
[root@localhost /]# rm -rf /usr/lib64/mysql
[root@localhost /]# rm -rf /usr/share/mysql

Five: Delete my.cnf

After uninstallation, /etc/my.cnf will not be deleted and needs to be deleted manually.

[root@localhost /]# rm -rf /etc/my.cnf

Finally, check whether the uninstallation is complete. If there is no result, it means the uninstallation is complete.

[root@localhost /]# rpm -qa|grep -i mysql

The above is the relevant knowledge about uninstalling MySQL 8.0 on Linux. Thank you for your learning and support for 123WORDPRESS.COM.

<<:  MySQL 8.0.15 winx64 installation and configuration method graphic tutorial under windows

>>:  The difference between hash mode and history mode in vue-router

Recommend

Differences and usage examples of for, for...in, for...of and forEach in JS

for loop Basic syntax format: for(initialize vari...

Detailed explanation of Vue's list rendering

Table of contents 1. v-for: traverse array conten...

Docker uses Supervisor to manage process operations

A Docker container starts a single process when i...

How to make vue long list load quickly

Table of contents background Main content 1. Comp...

Detailed explanation of how to install MariaDB 10.2.4 on CentOS7

CentOS 6 and earlier versions provide MySQL serve...

Angular Dependency Injection Explained

Table of contents Overview 1. Dependency Injectio...

How to use wangEditor in vue and how to get focus by echoing data

Rich text editors are often used when doing backg...

Why I recommend Nginx as a backend server proxy (reason analysis)

1. Introduction Our real servers should not be di...

CentOS6.8 uses cmake to install MySQL5.7.18

Referring to the online information, I used cmake...

Detailed explanation of the new CSS display:box property

1. display:box; Setting this property on an eleme...

Detailed steps for yum configuration of nginx reverse proxy

Part.0 Background The company's intranet serv...

Two examples of using icons in Vue3

Table of contents 1. Use SVG 2. Use fontAwesome 3...