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
时间: 2024-09-28 15:10:02