Centos7.3 mysql5.7 密码修改及远程登陆配置

修改密码命令

set password for root@localhost = password('admin@123');

连接命令

ln -s /usr/local/mysql/bin/mysql /usr/bin

允许远程连接mysql配置

update user set host='%' where user='root';

如果出现错误:ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

则输入 SET SQL_SAFE_UPDATES = 0; 然后再次update

最后别忘了

flush privileges;

 

posted @ 2018-05-11 19:44  XinYiBuFang  阅读(639)  评论(0编辑  收藏  举报