1:查看MySQL是否安装:
[root@localhost usr]# yum list installed mysql*
2:卸载MySQL:
[root@localhost usr]# yum remove mysql mysql-server mysql-libs compat-mysql51
[root@localhost usr]# rm -rf /var/lib/mysql
[root@localhost usr]# rm /etc/my.cnf
3:查看yum服务器可下载mysql的版本信息:
[root@localhost ~]# yum list | grep mysql
4:看着yum服务器有没有合适的安装包
[root@localhost ~]# yum list | grep mysql
5:yum安装MySQL:
#安装MySQL客户端
[root@localhost ~]# yum install mysql
#安装MySQL服务端
[root@localhost ~]# yum install mysql-server
#安装MySQL的库和头文件
[root@localhost ~]# yum install mysql-devel