DB Connection Failed

Re: DB Connection Failed

by Howard Miller -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Check your database permissions. Almost always, this is caused by getting the 'GRANT' command wrong for creating the username to access the database. Make sure, in particular, that you have supplied the host that is allowed to connect correct. By default, MySQL only permits access from the *same* host (not what you want). 

Failing that, is something blocking port 3306 between the two machines? If yo have command line access you can quickly check that from the Moodle server...

telnet mysql.server 3306

...substitute 'mysql.server' with the hostname or IP of the database server. It should connect. If it times out then something is preventing the basic connection (firewalls or MariaDB configuration most likely)