不知鱼耶

导航

mysql8无法远程登录

登录mysql:mysql -u root -p

使用数据库:use mysql;

查看root用户的host是不是%,如果是localhost需要调整:select host,user,authentication_string,plugin from user;

不是‘%’,调整权限  GRANT ALL ON *.* TO 'root'@'%';

最后给root账户所有权限 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

 

posted on 2020-04-07 10:29  不知鱼耶  阅读(1070)  评论(0)    收藏  举报