![WordPress 安装期间出现未知的 MySQL 语法错误](https://linux22.com/image/788157/WordPress%20%E5%AE%89%E8%A3%85%E6%9C%9F%E9%97%B4%E5%87%BA%E7%8E%B0%E6%9C%AA%E7%9F%A5%E7%9A%84%20MySQL%20%E8%AF%AD%E6%B3%95%E9%94%99%E8%AF%AF.png)
我正在尝试按照说明在本地服务器上安装 Wordpress这一页
现在我陷入了这一步:
GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'password';
尝试用这个命令替换'password'
我的实际密码,但是 MySQL 抱怨句子末尾有一个多余的撇号,但我没有发现任何错误。
mysql> GRANT ALL ON wordpress.* TO 'wp_admin'@'localhost' IDENTIFIED BY 'wordpress1sthebest';
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 'wordpress1sthebest'' at line 1
尝试在 phpMyAdmin 中运行它, 这就是我得到的
请帮忙
答案1
较新版本的 MySQL 不再允许该语法。现在分为两个步骤:
CREATE USER ... IDENTIFIED BY ...;
GRANT ... TO ...;
WP 有新版本吗?