0

I'm trying to install Wordpress on my local server according to instruction described on this page

And now I'm stuck on this step:

GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'password';

Tried this command replacing 'password' with my actual password, but MySQL complains about an extra apostrophe at the end of a sentence, but I can't find any mistake.

mysql> GRANT ALL ON wordpress.* TO 'wp_admin'@'localhost' IDENTIFIED BY 'wordpress1sthebest';

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 'wordpress1sthebest'' at line 1

Tried to run it also in phpMyAdmin, here is what i've got

Please help

ghostone
  • 5
  • 1
  • Think the entire `IDENTIFIED BY 'password'` is extraneous. Try just `GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost';` – tsc_chazz Aug 03 '23 at 17:45
  • It is not extraneous. Instead, the syntax has changed. – Rick James Aug 03 '23 at 18:17
  • To be honest, I'd never seen the older syntax so I was assuming that the user was already created... I should have checked the instructions page, I guess. – tsc_chazz Aug 03 '23 at 18:19

1 Answers1

0

Newer versions of MySQL no longer allow that syntax. It is now two steps:

CREATE USER ... IDENTIFIED BY ...;
GRANT ... TO ...;

Is there a newer version of WP?

Rick James
  • 2,463
  • 1
  • 6
  • 13