MySQL>update user set host = '%' where user = 'root';
MySQL>select host, user from user;
MySQL>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
MySQL>FLUSH PRIVILEGES;
分号不能少
mysql版本5.7
本文共 277 字,大约阅读时间需要 1 分钟。
MySQL>update user set host = '%' where user = 'root';
MySQL>select host, user from user;
MySQL>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
MySQL>FLUSH PRIVILEGES;
分号不能少
mysql版本5.7
转载于:https://www.cnblogs.com/weilovehua/p/9934216.html