I was trying to install wordpress on ubuntu using the link and struck at https://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-database
When I run this command,I get the error-
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
I tried almost every syntax by changing the wordpress@localhost
to 'wordpress'@'localhost'
I tried removing and adding the APOSTROPHE on 'root'
in IDENTIFIED BY 'root'
,
then after searching I tried this command as well - GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY 'root
' and got
Error - ERROR 1410 (42000): You are not allowed to create a user with GRANT
Nothing found working for me. Please help where am doing mistake. Thanks
P.S. Database is already there -
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| wordpress |
+--------------------+
5 rows in set (0.01 sec)
You needn't include the
IDENTIFIED BY
bit when granting privileges. If you need to create a user and grant permissions, that's two operations:Be sure to change the
superSecretPassword!123
bit to something better.