作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我已经将 mysql 8.0.12 安装到一个 linux 节点中,当我尝试授予以下授予权限以从其他节点获取访问权限时,出现 42000 错误
命令发出:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
返回结果:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'secure1t'' at line 1
如有任何帮助,我们将不胜感激。
最佳答案
您不在GRANT
查询中使用IDENTIFIED BY
,它在CREATE USER
中使用。
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
GRANT命令引用
CREATE USER命令引用
关于MySQL 错误 1064 (42000) : You have an error in your SQL syntax;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52372165/
我是一名优秀的程序员,十分优秀!