尝试在 Ubuntu 上安装 wordpress

尝试在 Ubuntu 上安装 wordpress

我尝试按照此方法在 ubuntu 上安装 WordPresshttps://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-database

但每次我运行这个

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
    -> ON wordpress.*
    -> TO wordpress@localhost
    -> IDENTIFIED BY 'password';

我明白了

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 'password'' at line 4

我知道我做错了,只是不知道错在哪里

请帮忙谢谢

终端截图

答案1

IDENTIFIED BY {password}位是不必要的。如果尚未创建 MySQL 用户,则:

CREATE USER 'wordpress'@'localhost' IDENTIFIED WITH mysql_native_password BY 'superSecretPassword!123';

然后您可以分配权限:

GRANT ALL ON `wordpress`.* TO 'wordpress'@'localhost';

相关内容