wordpress can't login / can't access the database

 Sometimes you get an error with a wordpress site where it says 'wordpress can't access the database'

That's because it's not using the native mysql password.

If your wordpress database is called 'wordpress' and your user is called 'user' and your password is 'password', login as root on mysql and type:

ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Check the config file has the right password in it, probably

/var/www/wordpress/wp-config.php

That will fix it.

Popular posts from this blog

forcing deactivating of plugins via mysql

turning on debug mode