Error establishing a database connection 2022

Hi Jack sorry for the wait. So the consensus from the Devs is that this wasn’t caused by DevKinsta. I looked further into all of your logs and noticed a few things:

You created new_site on May 27th:
[2022-05-27 20:45:53.002] [info] [createNewDb] Create database: test_site

And errors with this database didn’t start until September 27th:
[2022-09-27 10:51:12.500] [info] [updateSiteUrl] Current and New URL: { site: { id: 'ad7c4bb9-167b-4b0d-b4dc-bdc98a4816ad', status: 'installFailed', name: 'test site',

Your MySQL log also only goes back until September 27th, earlier that day:
2022-09-27 02:51:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.5+maria~focal started.

You created your test2 site/database later that day, which explains why it’s still there:
[2022-09-27 11:35:37.863] [info] [createNewDb] Create database: test2

The same database errors show for your main development site as well. This tells me that something happened before September 27th that lead to your database data being deleted/lost.

What’s important to note is that if you completely uninstall Docker/clear its data from the debug page then reinstall it, you run into this issue. All the DevKinsta sites will exist, however the databases(which were stored on Docker volumes) will be gone.

In my mind, that’s the most likely cause to your issue. Either all of the Docker data was lost or Docker was uninstalled then reinstalled leading to lost volumes/data. There’s no way to see that in the logs, unfortunately.

I did notice that you have your files on your D drive instead of C. I’m not sure if that’s an external drive or just a secondary drive but it’s also possible there was some data loss/corruption. That would also explain some of the issues your were having in this thread (the dates I shared above match your posts here as well): Local site greyed out

That’s as much as we can see just from log files but I can confirm that there were no DevKinsta actions that would have deleted your databases. The issue is definitely with either Docker or with your PC/storage. Again, we are working on our on built-in database backup but it’s always best to have your own incremental backup set up until then.