Site does not work anymore. Error establishing a database connection

Oh, hey Marc. haha

Ok, so the first problem was solved right?
About the 502 error, can you say what appears on the browser console and provide two log files?
The first log file is Local’s, if you need help finding it:

Also, apache/nginx log would be good. You can find it on your Local Sites folder, inside the folder of the site you’re having issues:
~/Local Sites/yoursite/logs/apache (grab the error.log file)
~/Local Sites/yoursite/logs/nginx (also the error.log file)

That way the community can help you further!