Centos6.5下安装MySQL
查看是否有安装
rpm -qa | grep mysql
删除包
rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64
所需要的安装包有:【可以从mysql的官网下载】
- mysql-community-common-5.7.21-1.el6.x86_64.rpm
- mysql-community-libs-5.7.21-1.el6.x86_64.rpm
- mysql-community-devel-5.7.21-1.el6.x86_64.rpm
- mysql-community-client-5.7.21-1.el6.x86_64.rpm
- mysql-community-server-5.7.21-1.el6.x86_64.rpm
并且按照上述的顺序依次安装。使用命令如下:rpm -ivh mysql-community-client-5.7.21-1.el6.x86_64.rpm
最后检验一下,即可
[root@localhost ~]# rpm -qa |grep mysql
mysql-community-client-5.7.21-1.el6.x86_64
mysql-community-common-5.7.21-1.el6.x86_64
mysql-community-devel-5.7.21-1.el6.x86_64
mysql-community-libs-5.7.21-1.el6.x86_64
mysql-community-server-5.7.21-1.el6.x86_64