Setting the owner and password of the blog in mysql

When creating the wordpress database, you need to set the owner.

First, create the database.

mysql> create database wordpress;

then create the  user who will have write permissions:

mysql> create user 'wordpress'@'localhost' identified with mysql_native_password by 'somepassword';

mysql> flush privileges;

If you forget the password, you can change it again like so:

mysql> alter user 'wordpress'@'localhost' identified with mysql_native_password by 'somepassword';

If you are using mysql version 8 or later, you need "with mysql_native_password" otherwise wordpress doesn't authenticate the database owner. At least, that was still true at the time of writing this.

If you are using mysql version 5 or below, you can skip that. 

Popular posts from this blog

bash + python script to find wordpress malware and delete it.

enabling web interface updates over FTP or directly

turning on debug mode