在linux安装指定版本mysql是一个困难的事情,yum安装一般是安装的mysql5.1,用yum安装mysql5.5步骤如下:
1.安装mysql-5.5的yum源
cd /etc/yum.repos.d/
rpm -ivh http://repo.mysql.com/yum/mysql-5.5-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm
2.修改安装好的yum源
编辑 /etc/yum.repos.d/mysql-community.repo文件,将5.5的enabled改为1,5.6的enabled改为0
3.安装mysql-5.5
yum install mysql-community-client mysql-community-devel mysql-community-server
4.进入mysql
/usr/bin/mysql_secure_installation 修改你需要的mysql密码
5. 安装mysql-devel
yum install mysql-devel