检查是否已下载
1.检测系统是否已经安装过mysql或其依赖,若已装过要先将其删除,否则第4步使用yum安装时会报错:
yum list installed | grep mysql(检查是否有mysql依赖)
yum -y remove mysql-libs.x86_64(存在mysql依赖则把它删除)
下载mysql
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
执行
rpm -ivh mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql
使用yum安装mysql
Sudo yum install mysql-community-server –y
启动mysql服务
Sudo service mysqld start<