Hi, I’ve followed this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04
I’ve narrowed down to user problem because I can connect with root (just to test) but none of the other others users work.
part 1: db
CREATE DATABASE nicedb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE USER ‘mrnice’@‘localhost’ IDENTIFIED BY ‘nicepass’; GRANT ALL PRIVILEGES ON nicedb.* TO ‘mrnice’@‘localhost’; FLUSH PRIVILEGES;
part 2: wp_config
define(‘DB_NAME’, ‘nicedb’); /** MySQL database username / define(‘DB_USER’, ‘mrnice’); /* MySQL database password */ define(‘DB_PASSWORD’, ‘nicepass’);
the above result gets Error establishing a database connection
when I use mysqlshow -u mrnice -p, it works with my password. Only root@rootpass works and gets me to the next page to configure the rest. How do I correctly configure a user for my wordpress db?
This is on Unbuntu 19.04, mysql Ver 8.0.17-0ubuntu2 and latest stable wordpress release.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!