Error establishing a database connection 2022

  1. This is the full path:


  1. test2 was created when I was trying to troubleshoot the “site greyed out” issue that you were helping me with.

Can’t find any results for “jack” in the top \wsl$ folder …

Sorry, can only find “jack-sheo.local.json”

That’s weird, I’ve always had that path for the Docker volumes. Your path seems to be for the old version of Docker:

It might be because you are on Windows Home edition, but I’m not 100% sure.

How far back do your logs here go?

Do you only see entries from November? This just doesn’t make any sense to me because no action from DevKinsta would do this. A stretch would be an Antivirus program quarantine on your system but I don’t know if that’s possible.

So I’ll ask our Devs if they have any addition ideas. Please take a screenshot of \\wsl$\ so we can see everything there.

Also just to confirm, between being able to access your site on Sept 29 and not having a DB now, the only change on your system was the Docker update, correct? Was it an automatic update or did you manually tell Docker to update? I think that depends on your setting here:

  1. The logs start from 27 Sep 2022. That’s the day when I last reached out to you about the sites turning grey again. Managed to access the site on 29 Sep 2022.

  1. This is the screenshot of \wsl$\

  1. My Docker Desktop is set to automatic update

Even that looks a little different from what I have:

Can you please copy those log entries to a txt file then share it as well?

I’ll ask our developers for their input but for now please disable the automatic updates in Docker. I’m not sure if that caused it but it’s best to just disable them to be sure.

Log file attached.

devkinsta_db log.txt (241.4 KB)

I won’t be doing anything on devkinsta for now until I know for sure whether I can get my database back.

I only have one project, which is the one lost. Unfortunately, I don’t have any backup and the bulk of the work was done many many months back before I first had the greyed-out issue.

Two questions:

  1. I noticed that the devkinsta page shows the site using 183mb. Does this mean the data is somewhere?

  2. Why does devkinsta list the site as a custom site?

Thanks for sharing that @jacksheo. I honestly understand the apprehension here since we don’t know exactly why the database disappeared. We are working on an automated backup system built-into DevKinsta which will cover situations like these. You could also use an incremental backup plugin while developing to make sure there’s always a copy of your DB among your sitefiles.

  1. This is counting files & database. You might have an old backup.sql file in your site root. DevKinsta used to leave those there after pushing/pulling the site. If you do have a backup.sql, it won’t be your most recent database but you can still try to import it to be sure (I can help you with this if needed).
  2. The function DevKinsta uses just checks for a valid WP install. Since your WP install is returning a database error, DevKinsta is treating it as a custom site.

The only action within DevKinsta that modifies that database is “Deleting a site.” If your main.log/main.log.old go back far enough, we can see each action that DevKinsta ran but that wouldn’t be helpful in restoring the database. There are system-level things that could cause data-loss as well like OS updates and antiviruses. It’s really odd though that you seem to have issues with DevKinsta every time you leave it for more than a month.

Hey Kevin, pls let me know where I can find this backup.sql

And how to go about restoring if I can find it.


Hey Jack, so if you go into your site files at this approximate path:

Is there a backup.sql in there?

No signs of backup.sql …

Unfortunately, that was my best guess, Jack. Unless you have a plugin that took database backups or you have a .sql file somewhere among your files there’s no way to get the database back.

Are the devs still looking at the log I sent?

There was nothing really relevant in that log. Do your main.log/main.log. files go back to September? If they do please private message those to me as well.


main.log goes back to 26 May 2022.

I just PM you

1 Like

I know you’re on Windows 10 Home edition, but can you verify that when you go to your General Docker settings you don’t get the option to disable the WSL 2 based engine? I just want to be sure you’ve never changed that option (if it actually shows).

I’m off for now but I’ll be back tomorrow and let you know if our devs seeanything in your logs.

That’s correct, Kevin.

I can’t disable WSL2

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.

In my memory, I don’t recall reinstallling docker.

Test & test2 were created as part of troubleshooting efforts to solve the “greyed out” issue.

D drive is a secondary harddisk in my PC. It only holds the Wordpress files.

Losing the database is very painful as the bulk of the work was done late last year. And I don’t have a backup.

Nevertheless, thanks for taking the time to look into this. It may be good to send out a note to all new & existing devkinsta users to do regular backups.

Yes, based on what I see with the logs, something happened before you created test2 that wiped out the database. I absolutely understand the frustration here Jack and thank you for sharing as much as you have. I’m definitely going to talk to our content team to see if they can add a database backup notice somewhere either in our documentation or within DevKinsta.