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:
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @artctrldelinfob0d23996f849,
Let’s start from the beginning and create a database and a user. You can use the bellow commands:
mysql
in mysql type in
CREATE DATABASE db_name_here;
CREATE USER 'user-here'@'localhost' IDENTIFIED WITH mysql_native_password BY 'my-strong-password-here';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON db_name_here.* TO 'user-here'@'localhost';
In these instructions:
Now you can try and install your WordPress website. When going through the installation, you can add the database name, database user and the database user’s password. It should work without a problem.
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.