Error: Database connection failed After Migrating

Error: Database connection failed After Migrating

by Jeffrey Bowers -
Number of replies: 1

Hi Everyone! I hope someone here can help me. I'm trying to migrate our server to an EC2 instance with Amazon. I have been following this tutorial:  https://docs.moodle.org/37/en/Moodle_migration

I have tried both manually moving the data and using the command line option. I have tried to verify the config.php and the folder permissions to the best of my ability. Yet, I am still getting the following error: 

"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" 

Does anyone have any ideas I can try? 

Thanks in advance!


Average of ratings: -
In reply to Jeffrey Bowers

Re: Error: Database connection failed After Migrating

by Ken Task -
Picture of Particularly helpful Moodlers

Might use this

https://docs.moodle.org/37/en/Installation_Guide_for_Installing_on_Amazon_EC2

as reference.

In config.php there a lines for the DB ... DB Host, DB name, DB user, DB password.

They need to be set to the values one would use when using the mysql client on the server to connect to the DB server.

mysql -h IPaddress -u user -p'password'

if DB server is on localhost

mysql -u user -p'password'

One other ... there is a line in config.php for dbcollation ... must match the moodle DB collations for DB and all tables and columns in those tables.

'SoS', Ken