Moodle 3.9.2 migration error

Re: Moodle 3.9.2 migration error

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

Presumably one or more of the $CFG->dbXXXX settings needs changing in config.php following the migration, example settings:

$CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname    = 'moodle';     // database name, eg moodle
$CFG->dbuser    = 'username';   // your database username
$CFG->dbpass    = 'password';   // your database password

Is MySQL on the same server as Moodle? If not there may be a network issue between the Moodle server and the database server such as a firewall blocking access.

If the Moodle server is Linux you can test access from the command line by copying the values from config.php and trying to connect using the mysql client, e.g. for the above settings:

$ mysql -u username -h localhost -p moodle
Enter password: password

If you're still having problems let us know more details including the MySQL version and whether it's on the same server as Moodle.