由于近期atomic源无法使用,所以安装mysql5.5不太方便。这里使用rpm包来安装mysql5.5。
使用yum下载rpm包很简单,首先安装yum-utils。
yum install -y yum-utils
然后就可以用yumdownloader命令了。
例如,我要下载openssl-devel这个包,使用命令yumdownloader openssl-devel就可以了。
这里,我已经把安装mysql5.5需要的rpm包都已经整合出来了,大家可以下载
mysql-5.5.37-22.el6.art.x86_64.rpm
mysql-devel-5.5.37-22.el6.art.x86_64.rpm
mysql-server-5.5.37-22.el6.art.x86_64.rpm
mysqlclient16-5.1.59-2.el6.art.x86_64.rpm
mysql-libs-5.5.37-22.el6.art.x86_64.rpm
现在开始安装mysql5.5
1.首先,检查是否安装了mysql-lib
[root@test01 ~]# rpm -qa |grep mysql
mysql-libs-5.1.71-1.el6.x86_64
2.卸载 mysql-libs-5.1.71-1.el6.x86_64
[root@test01 ~]# rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64
3.然后下载安装mysql5.5所需要的rpm包
wget ftp://ftp.wktdhe.com/pub/mysql/mysql-5.5.37-22.el6.art.x86_64.rpm
wget ftp://ftp.wktdhe.com/pub/mysql/mysql-devel-5.5.37-22.el6.art.x86_64.rpm
wget ftp://ftp.wktdhe.com/pub/mysql/mysql-server-5.5.37-22.el6.art.x86_64.rpm
wget ftp://ftp.wktdhe.com/pub/mysql/mysqlclient16-5.1.59-2.el6.art.x86_64.rpm
wget ftp://ftp.wktdhe.com/pub/mysql/mysql-libs-5.5.37-22.el6.art.x86_64.rpm
4.安装mysql
[root@test01 ~]# rpm -ivh --nodeps --force mysqlclient16-5.1.59-2.el6.art.x86_64.rpm mysql-libs-5.5.37-22.el6.art.x86_64.rpm mysql-5.5.37-22.el6.art.x86_64.rpm mysql-devel-5.5.37-22.el6.art.x86_64.rpm mysql-server-5.5.37-22.el6.art.x86_64.rpm
warning: mysql-5.5.37-22.el6.art.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5ebd2744: NOKEY
Preparing... ########################################### [100%]
1:mysql-libs ########################################### [ 20%]
2:mysql ########################################### [ 40%]
3:mysql-devel ########################################### [ 60%]
4:mysql-server ########################################### [ 80%]
5:mysqlclient16 ########################################### [100%]
成功,然后启动mysql,查看版本即可
[root@test01 ~]# service mysqld start
[root@test01 ~]# rpm -qa mysql-server
mysql-server-5.5.37-22.el6.art.x86_64