1. 版本衝突
mysql57-community-release conflicts with mysql80-community-release-el8-1.noarch
分析
安裝了其他版本的mysql再安裝mysql57的時候依賴出問題
解決
刪除老的mysql工具
rpm -Uvh mysql57-community-release-el7-10.noarch.rpm
#命令列出現 mysql57-community-release-el7-8.noarch
rpm -e --nodeps mysql57-community-release-el7-8.noarch
2. 依賴報錯
Error: Package: mysql-community-server-5.7.20-1.el7.x86_64 (mysql57-community)
Requires: libsasl2.so.3()(64bit)
Error: Package: mysql-community-client-5.7.20-1.el7.x86_64 (mysql57-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
Error: Package: mysql-community-libs-5.7.20-1.el7.x86_64 (mysql57-community)
...
分析
因為 舊版本 mysql 的依賴問題;最快的解決方案就是解除安裝重灌
3. 解除安裝
1.快速刪除
yum remove mysql mysql-server mysql-libs mysql-server
2.查詢殘留檔案
rpm -qa | grep -i mysql
## 將查詢出來的檔案刪除
yum remove mysql-community-common-5.7.20-1.el6.x86_64
## 刪除殘餘目錄
whereis mysql
rm –rf /usr/lib64/mysql
3.刪除依賴
## 查詢依賴
yum list installed | grep mysql
## 刪除找到的依賴
yum -y remove mysql-libs.x86_64
4. 安裝新mysql
1.新增映象源,從官網downloads選取
wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql
yum-config-manager --disable mysql55-community
yum-config-manager --disable mysql56-community
yum-config-manager --enable mysql57-community-dmr
yum repolist enabled | grep mysql
2.安裝
yum install mysql-community-server