![尝试在 Ubuntu 上安装 wordpress](https://linux22.com/image/936865/%E5%B0%9D%E8%AF%95%E5%9C%A8%20Ubuntu%20%E4%B8%8A%E5%AE%89%E8%A3%85%20wordpress.png)
我尝试按照此方法在 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';