Tuesday, December 5, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  8] [ 0]  / answers: 1 / hits: 69044  / 3 Years ago, wed, june 9, 2021, 8:07:24

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-

-> 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)

More From » mysql


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:

mysql> CREATE USER 'wordpress'@'localhost' IDENTIFIED WITH mysql_native_password BY '{superSecretPassword!123}';
mysql> GRANT ALL ON `wordpress`.* TO 'wordpress'@'localhost';

Be sure to change the superSecretPassword!123 bit to something better.

[#1834] Wednesday, June 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 380
Total Questions: 109
Total Answers: 101

Location: England
Member since Tue, Sep 8, 2020
3 Years ago