Can’t select database - Docker adminer wiped out database?

Hi, I had trouble with one of our databases in DevKinsta so i used the troubleshoot feature in Docker to Clean/Purge data. After running this it seems all my databases are missing? This is the error i’m seeing when trying to visit my dev site:

Unknown database 'pacbio'

Can’t select database

We were able to connect to the database server (which means your username and password is okay) but not able to select the pacbio database.

  • Are you sure it exists?
  • Does the user root have permission to use the pacbio database?
  • On some systems the name of your database is prefixed with your username, so it would be like username_pacbio. Could that be the problem?

I do not have a way to pull this site down from staging since i have done so much work locally and now it seems everything is gone. I have all the site files but is there a way to restore the database? anyway to see if the database still exists? Do i have to completely delete adminer from docker and start completely over? Any help would be greatly appreciated as this is extremely time sensitive and if i have to start over it will be devastating.

Here is a screenshot of what i’m seeing in the database manager:

Let me know if I can provide any more info and any information would be greatly appreciated, thanks in advance

Hi @aaronblomberg, thanks for reaching out. Do you remember exactly what you cleaned/purged? The database is stored within a Docker volume so if the volume was deleted, the database is gone. I’m able to reproduce this when I use the troubleshooter to delete all data sets. On checking my machine, the actual mysql data files also get deleted when this is run.

Is there any chance Time Machine saved your Docker files? This article might be helpful but it depends on what settings you had within Docker: How To Restore a Docker Container with Time Machine (Mac OS) - Jennifer Zelazny

hi @Kevin - I used the clean/purge function in docker to clean the database but looks like it most likely wiped them all out…

what’s the best next option? is it to delete the adminer and start over? or will doing that wipe everything out? is there any option to restore the database or do i have to just start over from scratch? unfortunately the backup program we use excludes that folder so i do not have a backup at this time :confused:

Sorry, that’s unfortunate @aaronblomberg, I’ve been in a similar situation before with lost backups/work. So if Docker purged the actual database volume then yes, it’s gone. That’s the only place where the database is saved (unless you had a backup plugin running within WordPress).

So the issue is that DevKinsta’s data wasn’t updated when the volume was deleted from Docker; it’s still expecting a database to be there. The easiest solution would be to create a new WordPress site within Devkinsta using the most recent Staging backup of the database then overwrite the files of the "new " site with your local files.

You can also make a copy of your DevKinsta directory then uninstall/reinstall DevKinsta/Docker if you prefer. Either way, it seems Docker doesn’t leave anything restorable behind when you purge/delete the data that way.

hi @Kevin - thanks for the quick response. that’s unfortunately what i feared. i’ll make sure to have active backups on the devkinsta folder from now on to prevent this from occurring in the future. i appreciate the help. thanks

1 Like