

1. yum 安裝 mysql5.7 yum 源
yum localinstall? mysql57-community-release-el6-8.noarch.rpm
2. 查看是否成功安裝MySQL Yum Repository
yum repolist enabled|grep ""mysql.*-community.*
3. 安裝mysql
yum install mysql-community-server
4.開(kāi)啟數(shù)據(jù)庫(kù)服務(wù)
service mysqld start

不需要密碼登錄之后?
update mysql.user set authentication_string=PASSWORD('123123') where user='root';
?flush privileges;

5. 授權(quán)用戶?

報(bào)錯(cuò)之后 通過(guò) 通過(guò)下面的命令修改密碼
ALTER USER USER() IDENTIFIED BY '123123';
修改之后 再進(jìn)行授權(quán)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123123' WITH GRANT OPTION;
如果 不行 授權(quán)就用?
use mysql;
update user set host='%' where user = 'root' and host!='localhost' ;
然后就 ok 了