我试图使用链接在 ubuntu 上安装 wordpress 并点击 https://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-database
当我运行这个命令时,我得到了错误-
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
-> ON wordpress.*
-> TO wordpress@localhost
-> IDENTIFIED BY 'root';
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 'root'' at line 1
wordpress@localhost
我通过更改to尝试了几乎所有语法'wordpress'@'localhost'
'root'
我尝试在in上删除和添加 APOSTROPHE IDENTIFIED BY 'root'
,
然后在搜索之后我也尝试了这个命令 - GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY 'root
'并得到了
错误 -ERROR 1410 (42000): You are not allowed to create a user with GRANT
没有发现对我有用。请帮助我在哪里做错了。谢谢
PS 数据库已经存在 -
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| wordpress |
+--------------------+
5 rows in set (0.01 sec)
IDENTIFIED BY
授予权限时不需要包含该位。如果您需要创建用户并授予权限,这是两个操作:确保将
superSecretPassword!123
位更改为更好的东西。