我的SQL语句中的语法错误在哪里?
mysql> grant all privileges on blog_demo_com.* to 'wordpress'@'localhost' identified by 'wordpress#demo';
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 'wordpress#demo'' at line 1
mysql>
我检查了我的SQL语句,我真的找不到问题。
EDIT-01
my MySQL version:
mysql Ver 8.0.25 for Linux on x86_64 (MySQL Community Server - GPL)
MySQL 8不支持identified by
语法。x: https://dev.mysql.com/doc/refman/8.0/en/grant.html
GRANT
priv_type [(column_list)]
[, priv_type [(column_list)]] ...
ON [object_type] priv_level
TO user_or_role [, user_or_role] ...
[WITH GRANT OPTION]
[AS user
[WITH ROLE
DEFAULT
| NONE
| ALL
| ALL EXCEPT role [, role ] ...
| role [, role ] ...
]
]
}