Moodle 3.1
PHP 7.0.8
MySQL 5.7.15
Ubuntu 16.04 on DigitalOcean
I am installing Moodle 3.1 according to the step-by-step instructions for Ubuntu. All the command line instructions went as expected. However during Step 7, the browser-based portion of the install, I get the following error after submitting the database details.
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'prn_moodle_user'@'localhost' (using password: YES) in /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php on line 79
As this is a new installation, there is no config.php file yet.
I am able to connect to the database as 'root', but not as the user created for moodle (moodleuser). When I attempt to connect to the DB as 'moodleuser' via the command line, I get the following error.
ERROR 1045 (28000): Access denied for user 'moodleuser'@'localhost' (using password: YES)
I have checked and double-checked the permissions for the moodle user and everything is as it was specified in the instructions. I have also verified the password is correct.
If I SHOW GRANTS for the user, here is what I get:
Grants for moodleuser@localhost
GRANT USAGE ON *.* TO 'moodleuser'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON `moodle`.* TO 'moodleuser'@'localhost'
I can login as 'root' with no problems, so the database is running. In addition to logging in from the command line, I can log in as 'root' from PHPMySqlAdmin (but not as 'moodleuser').
Any ideas what's going on and how I can fix it? I don't want to run Moodle as 'root'.