1. 程式人生 > >Centos7.3 mysql5.7 密碼修改及遠程登陸配置

Centos7.3 mysql5.7 密碼修改及遠程登陸配置

改密碼 遠程 error 遠程連接 連接 safe trie 5.7 sql

修改密碼命令

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;

Centos7.3 mysql5.7 密碼修改及遠程登陸配置