Error: Database connection failed!

Our OJS site is down with this error message: “Database connection failed!”.
For some unknown reason, OJS is unable to connect to its database. Without us making any changes, from one day to the next our CMS was unable to connect to its MySQL database. Have there been any problems or changes with the server on your end? SSH access is enabled but we can’t connect to the server via SSH. I don’t know if this is connected or if it’s a completely separate issue…I’d be grateful for any info and advice you can give. I’ve read the comments on topics reporting the same problem, but it doesn’t really help us.

Hi @sdawes,

It sounds to me like something is up with your server. You can eliminate OJS as the source of the problem by running a test script, something like Script for a quick PHP MySQL DB connection test. · GitHub, using the credentials from your config.inc.php configuration file. If that script can connect, but OJS can’t then OJS is the problem; if that script can’t connect either, then it’s something on your server outside of OJS.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

thanks! yes, it was the shared server that was the problem, not OJS - sorry, and thanks for responding!

hi, how to use this script?