centos在线安装mysql5.6

1、检测是否已经安装mysql

yum list installed | grep mysql

2、安装删除

 yum -y remove mysql-*

3、下载安装源文件

 wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

4、把源加入到系统中

 rpm -ivh mysql-community-release-el6-5.noarch.rpm

5、安装msyql

yum install mysql-community-server

6、启动msyql

service mysqld start

7、修改密码

 mysql -u root
 use mysql;
 update user set password=PASSWORD("123456") where User='root';
 flush privileges;

8、用root用户重新登录

msyql -uroot -p

输入密码即可

你可能感兴趣的:(mysql,在线安装,centos)