Report this

What is the reason for this report?

mysql error 1064

Posted on April 7, 2021

Hi,

I have just set up my second virtual host and it works. Now I want to install a second Wordpress site following the mysql from this tut:

https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-wordpress-sites-on-a-single-ubuntu-vps

Since I already have one site up and running on my first virtual host I only want to create a database and user for my second Wordpress site.

CREATE DATABASE SecondDatabase;

OK

CREATE USER SecondUser@localhost;

OK

SET PASSWORD FOR SecondUser@localhost= PASSWORD(“SecondPassword”);

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 ‘SecondPassword’’ at line 1

I have mysql Ver 8.0.23.

Then I tried:

CREATE USER ‘SecondUser’@‘%’ IDENTIFIED WITH mysql_native_password BY ‘SecondPassword’;

OK

GRANT ALL ON SecondDatabase.* TO ‘SecondUser’@‘%’;

OK

Wordpress site is not up and I’m afraid I have messed up my mysql users and databases.

I have changed the wp-config.php so it matches the mysql database, user and password names.

Any help on how to solve this will be greatly appreciated, thanks!

Ben

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.