1、检查当前系统中是否存在其它版本
yum list installed | grep mysql
2、如果存在就卸载
# yum remove mysql-libs.x86_64 -y
3、下载 mysql yum源到本地
# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
文件名 mysql-community-release-el6-5.noarch.rpm
4、安装(得到两个文件,mysql-community-source.repo和mysql-community.repo)
# rpm -ivh mysql-community-release-el6-5.noarch.rpm
5、查看mysql安装文件
# yum list | grep mysql-com
mysql-community-client.i686 5.6.43-2.el6 @mysql56-community
mysql-community-common.i686 5.6.42-2.el6 @mysql56-community
mysql-community-libs.i686 5.6.43-2.el6 @mysql56-community
mysql-community-release.noarch el6-5 installed
mysql-community-server.i686 5.6.42-2.el6 @mysql56-community
mysql-community-bench.i686 5.6.42-2.el6 mysql56-community
mysql-community-bench.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-client.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-common.i686 5.6.43-2.el6 mysql56-community
mysql-community-common.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-devel.i686 5.6.43-2.el6 mysql56-community
mysql-community-devel.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-embedded.i686 5.6.43-2.el6 mysql56-community
mysql-community-embedded.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-embedded-devel.i686 5.6.43-2.el6 mysql56-community
mysql-community-embedded-devel.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-libs.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-libs-compat.i686 5.6.43-2.el6 mysql56-community
mysql-community-libs-compat.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-server.x86_64 5.6.43-2.el6 mysql56-community
mysql-community-test.x86_64 5.6.43-2.el6 mysql56-community
6、安装 mysql
# yum install mysql-community-server.x86_64
7、启动 mysql
# service mysqld start
8、mysql 安全配置向导
# mysql_secure_installation