Error establishing a database connection

I have just intalled OJS 3.2.1-2 and it all went OK, but the next day this message appeared “Error establishing a database connection”.
It happened before, so I delete everything and installed it again, but the issue keeps repeating.

Any help would be nice. Thank you!

This error occurs when your database connection details are not configured correctly. You can find your database connection details in the file in the root directory of your application.

If you’re not sure how to configure your database connection details, I recommend you contact technical support for your hosting or service provider.