MySQL 8.0:check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password'' at line 1


【参考文章】:mysql 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at line 1

1. 问题原因

  MySQL 8.0 版本之后语法有更新,创建用户语句和权限修改语句需要分开执行

2. 解决方法

  创建账户:create user '用户名'@'访问主机' identified by '密码';

  权限修改:grant 权限列表 on 数据库 to '用户名'@'访问主机' ;(修改权限时在后面加with grant option)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY '123456' WITH GRANT OPTION' at line 1 mysq添加外键报错:check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=InnoDB' at line 1 check the manual that corresponds to your MySQL server version for the right syntax to use near '(0) NULL DEFAULT NULL COMMENT check the manual that corresponds to your MySQL server version for the right syntax to use near check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc 解决:[Err] 1064 - 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 【异常】MySQL建表报错: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 '"order"' at line 1 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 '11. set password for 'root'@'localhost' 1064 - 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 'groups)VALUES('1','hh','hh@163.com','Boss')' at line 1 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 '"id",
 
粤ICP备18138465号  © 2018-2026 CODEPRJ.COM