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