Mysql is not allowed to connect mysql server

  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;       刷新权限列表

猜你喜欢

转载自www.cnblogs.com/chengyangyang/p/10283168.html