MySQL8.0及之后的版本已经将创建账户和赋予权限的方式分开了,设置远程连接权限要用下面的语句才可以:
create user root@‘%‘ identified by ‘密码‘;
grant all privileges on *.* to root@‘%‘ with grant option;
flush privileges
Mysql远程授权报语法错误
原文:https://www.cnblogs.com/code-fun/p/14773302.html