安装不了,用rpm -qa|grep -i mysql 查看发现centos中虽然以前没有安装过mysql但里面还是安装了
[root@***-3 soft]# rpm -qa|grep -i mysql
mysql-libs-5.1.52-1.el6_0.1.x86_64
然后用命令[root@***-3 soft]# yum -y remove mysql mysql-*Loaded plugins: fastestmirror, refresh-packagekitSetting up Remove ProcessNo Match for argument: mysqlDetermining fastest mirrorsCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_614: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"Error: Cannot find a valid baseurl for repo: base接着用命令[root@***-3 soft]#rpm -e --nodeps mysql-libs-5.1.52-1.el6_0.1.x86_64成功卸载然后重新安装 [root@***-3 soft]# rpm -ivh MySQL-server-5.5.29-2.el6.x86_64.rpmPreparing... ########################################### [100%] 1:MySQL-server ########################################### [100%] PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password'/usr/bin/mysqladmin -u root -h xu-3 password 'new-password' Alternatively you can run:/usr/bin/mysql_secure_installation which will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers. See the manual for more instructions. Please report any problems with the /usr/bin/mysqlbug script!启动mysql服务[root@***-3 soft]# /etc/rc.d/init.d/mysql start 或 者 service mysql startStarting MySQL.. [ OK ]检查端口netstat -nattcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN服务已经启动!