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-2025 CODEPRJ.COM