step1. 切换到root用户
su -
## OR ##
sudo -i
step2. 安装remi软件源
CentOS及Red Hat (RHEL)平台
## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
step3. 查看MySQL版本号
CentOS 6.2/6.1/6/5.8 and Red Hat (RHEL) 6.2/6.1/6/5.8
yum --enablerepo=remi,remi-test list mysql mysql-server mysql-devel
输出:
Loaded plugins: changelog, fastestmirror, presto, refresh-packagekit
...
remi | 3.0 kB 00:00
remi/primary_db | 106 kB 00:00
Available Packages
mysql.i686 5.5.25-1.fc14.remi @remi
mysql-server.i686 5.5.25-1.fc14.remi
step4. 安装或升级到MySQL5.5.25
CentOS 6.2/6.1/6/5.8 and Red Hat (RHEL) 6.2/6.1/6/5.8
yum --enablerepo=remi,remi-test install mysql mysql-server
step5. 开启mysql服务并配置自启动
CentOS 6.2/6.1/6/5.8 and Red Hat (RHEL) 6.2/6.1/6/5.8
/etc/init.d/mysqld start
## OR ##
service mysqld start
chkconfig --levels 235 mysqld on
转载于:https://blog.51cto.com/chentianwang/1739740