配置Mysql远程连接的方法

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
flush privileges;

貌似在mysql8中会发生错误

Duplicate entry '%-root' for key 'PRIMARY' 在通过修改user表配置远程连接时遇到的错误
原因是表中有一条数据已经被修改为了%

posted on 2021-06-25 18:39  x-dai  阅读(54)  评论(0编辑  收藏  举报