Creating a moodle database

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

First, create the database.

mysql> create database moodle;

then create the  user who will have write permissions:

mysql> create user 'moodle'@'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 'moodle'@'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

could not find course/ could not find top level course/ could not find course category

migrating moodle from one server to another

installing moosh to make your life easier