mysql8以上远程授权

高版本修改用户权限方法:

先创建远程用户,再授权

mysql> create user 'root'@'%' identified by 'password';
Query OK, 0 rows affected (0.03 sec)

mysql> grant all privileges on . to 'root'@'%' with grant option;
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

还是无法远程参考这篇帖子
https://blog.csdn.net/zhangxiaohui4445/article/details/89469574
或者注释掉,建议注释掉

posted @ 2022-07-03 21:13  长情c  阅读(30)  评论(0)    收藏  举报