Q: Date/Time this occurred (Provide your time zone also) A: Discovered this on 10 Nov 2022. Singapore time.
Q: DevKinsta Version A: 2.8.0
Q: OS Version A: Windows 10 Home
Q: Docker Desktop Version A: 4.13.1
Q: Were any error codes or messages observed? If so, what were they? A: “Error establishing a database connection”
Q: Detailed Description of the Problem A: I tried to access my site today, having last assessed it on 29 Sept 2022.
(a) When I clicked on “Open Site”, the website showed “Error establishing a database connection”
(b) When I clicked on “Open WP Admin”, the website showed “Cannot select database”.
The database server could be connected to but the Jack_Sheo database cannot be selected.
(c) When I clicked on “Open database manager”, the website showed a bunch of error messages. See screenshot.
It seems my Jack_Sheo database has suddenly disappeared.
It is worrying as I don’t have any other backup.
How can I fix this pls? Appreciate your input pls.
P.S. I had looked through the forum and it seems this sudden database disappearance has happened to others as well. I’ve gone into Docker to look at the Resources settings but it says the resource limits are managed by Windows as I’m using WSL 2 backend.
Hi @jacksheo, thanks for reporting this. Looking at when Docker 4.13.1 came out vs the last time you accessed your site, my best guess is that it has something to do with a docker update.
Can you please open your filemanager and screenshot what you see at these two addresses:
Wow, that’s odd, you genuinely don’t have a data folder there. I wonder where your data is being stored. Can you go up one directory? What do you have here:
What is the actual path for this screenshot if it’s not here: \\wsl$\docker-desktop-data\data
I can see test2’s database was last modified in September so if something deleted all the the db data, it doesn’t make sense for that single DB to still be there.
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:
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.
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.
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:
I noticed that the devkinsta page shows the site using 183mb. Does this mean the data is somewhere?
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.
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).
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.