1. mysql -u root -p
2. select host from user where user=‘root‘; //可以看到当前主机配置信息为localhost.
3. update user set host = ‘%‘ where user =‘root‘ 如果2的列表不唯一,就需要后面添加条件
4. FLUSH PRIVILEGES; 刷新权限列表
原文地址:https://www.cnblogs.com/chengyangyang/p/10283168.html
时间: 2024-11-10 16:57:04