查询卸载其它旧版本的SQL
查询已安装MySQL或者mariadb的命令为:
rpm -qa|grep mysql;
rpm -qa|grep mariadb;
查询结果:
[root@dosbo-01 ~]# rpm -qa|grep mysql
pcp-pmda-mysql-3.11.3-4.el7.x86_64
mysql57-community-release-el7-9.noarch
qt-mysql-4.8.5-13.el7.x86_64
[root@dosbo-01 ~]# rpm -qa | grep mariadb
mariadb-5.5.52-1.el7.x86_64
mariadb-server-5.5.52-1.el7.x86_64
mariadb-libs-5.5.52-1.el7.x86_64
mariadb-devel-5.5.52-1.el7.x86_64
删除:
rpm -evh --nodeps pcp-pmda-mysql-3.11.3-4.el7.x86_64;
rpm -evh --nodeps mysql57-community-release-el7-9.noarch;
rpm -evh --nodeps qt-mysql-4.8.5-13.el7.x86_64;
rpm -evh --nodeps mariadb-5.5.52-1.el7.x86_64;
rpm -evh --nodeps mariadb-server-5.5.52-1.el7.x86_64;
rpm -evh --nodeps mariadb-libs-5.5.52-1.el7.x86_64;
rpm -evh --nodeps mariadb-devel-5.5.52-1.el7.x86_64;
查询系统版本
查询命令:
cat /etc/redhat-release;
根据操作系统版本下载合适的MySQL安装包
官方下载地址:MySQL :: Download MySQL Community Server (Archived Versions)
选择如下包
<