CentOS7 environment, uninstall MySQL

The solution is to uninstall and reinstall; if the spectator cannot uninstall, please close it directly

System: Centos 7.x
MySQL version: MySQL 5.7

Uninstall method:

  1. Quick delete
yum remove  mysql mysql-server mysql-libs mysql-server
  1. Find residual files
rpm -qa | grep -i mysql
  • Delete the queried files one by one, such as:
yum remove mysql-community-common-5.7.20-1.el6.x86_64
  1. Find the residual directory
whereis mysql
  • Delete directories one by one, such as:
rm –rf /usr/lib64/mysql

After the above is done, it is best to re-query related content to prevent omissions

  1. If after downloading, an error is reported:
InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800!
  • Need to be cleared: /etc/mysql, /var/log/mysql, /var/lib/mysql

Guess you like

Origin blog.csdn.net/weixin_42321517/article/details/115307742