# Can’t select database

**URL:** <https://community.kinsta.com/t/can-t-select-database/263>\
**Category:** Application Support\
**Created:** [January 27, 2021, 4:14am UTC](https://community.kinsta.com/t/can-t-select-database/263 "2021-01-27T04:14:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 4:14am UTC](https://community.kinsta.com/t/can-t-select-database/263/1 "2021-01-27T04:14:09Z")

</div>

Hi I downloaded DevKinsta, and started working on a new site.

Today I wanted to continue that work. But I get an error message:

" `Unknown database 'Shop_America_FI'`

# 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 `Shop_America_FI` database.

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

If you don’t know how to set up a database you should **contact your host**. If all else fails you may find help at the [WordPress Support Forums](https://wordpress.org/support/forums/)."

I check the details of the database name, username and password and they match in the wp-config.php file in my local folder on my desktop.

I tried opening the database manager via the DevKinsta application but I get this error message:  
MySQL » devkinsta\_db » Database: Shop\_America\_FIDatabase: Shop\_America\_FI  
Invalid database.

I don’t know what to do. I already put quite some work in it. And now it seems lost… I hope someone recognizes the problem and can help me with this.

PS I already restarted Docker, and the DevKinsta application without any difference.

---

<div class="post-metadata">

**Author:** ![peterkota](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/peterkota/32/35_2.png) [@peterkota](https://community.kinsta.com/u/peterkota)\
**Post date:** [January 27, 2021, 7:41am UTC](https://community.kinsta.com/t/can-t-select-database/263/2 "2021-01-27T07:41:55Z")

</div>

Hey @gerjo01 👋

Please open Docker Desktop and delete `devkinsta_adminer` container. After that try to restart DevKinsta and open a database. 🙂

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 1:48pm UTC](https://community.kinsta.com/t/can-t-select-database/263/4 "2021-01-27T13:48:03Z")

</div>

Hi Peter, I may have done it wrong, but this is what I did. I opened Docker - went to Dashboard - I deleted the devkinsta\_adminer. Then I reopened DevKinsta.

I tried to go to WP admin (via the button on the top right) and nothing, same errors: Can’t select database and invalid database if I go to the Database manager. It’s almost like there is no database anymore. But I do see the site in a screenshop on the DevKinsta dashboard. The local files are also there and the WPCONFIG file shows the right database name, username and password.

I really wanted to use this application to build a new website, test it, and then upgrade my Kinsta plan, since it would be site number 6. But it’s becoming a major headache this way. I really hope the work is not lost

---

<div class="post-metadata">

**Author:** ![peterkota](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/peterkota/32/35_2.png) [@peterkota](https://community.kinsta.com/u/peterkota)\
**Post date:** [January 27, 2021, 1:50pm UTC](https://community.kinsta.com/t/can-t-select-database/263/5 "2021-01-27T13:50:42Z")

</div>

@gerjo01 thanks for your reply!

Can you see your site if you open it in browser? I hope there is a problem only with adminer.

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 2:36pm UTC](https://community.kinsta.com/t/can-t-select-database/263/6 "2021-01-27T14:36:53Z")

</div>

Hi Peter,

 ![Screenshot 2021-01-27 at 15.19.48](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/7d1fe512623c143cbf874acd2c0d5d6874ffa2a6.png) no it won’t open. It says:

`Unknown database 'Shop_America_FI'`

# 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 `Shop_America_FI` database.

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

If you don’t know how to set up a database you should **contact your host**. If all else fails you may find help at the [WordPress Support Forums](https://wordpress.org/support/forums/).

When I click Open Site

---

<div class="post-metadata">

**Author:** ![peterkota](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/peterkota/32/35_2.png) [@peterkota](https://community.kinsta.com/u/peterkota)\
**Post date:** [January 27, 2021, 2:56pm UTC](https://community.kinsta.com/t/can-t-select-database/263/7 "2021-01-27T14:56:21Z")

</div>

@gerjo01 have you deleted manually database through Docker?

Can you try to check databases through terminal please?

```auto
docker exec -it devkinsta_db bash
mysql -p
#here copy your db password
show databases;

```

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 3:13pm UTC](https://community.kinsta.com/t/can-t-select-database/263/8 "2021-01-27T15:13:58Z")

</div>

@peterkota is this what you’re looking for:

![Screenshot 2021-01-27 at 16.12.48](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/8c6f3c9a3895067621fbfac81394e3a3601dfed3.png)

---

<div class="post-metadata">

**Author:** ![peterkota](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/peterkota/32/35_2.png) [@peterkota](https://community.kinsta.com/u/peterkota)\
**Post date:** [January 27, 2021, 3:14pm UTC](https://community.kinsta.com/t/can-t-select-database/263/9 "2021-01-27T15:14:36Z")

</div>

yes, and type in this sql console: `show databases;`

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 3:16pm UTC](https://community.kinsta.com/t/can-t-select-database/263/10 "2021-01-27T15:16:25Z")

</div>

@peterkota ![Screenshot 2021-01-27 at 16.15.52](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/d046c5c2e01928b3ebf05e89ec0a36f6f4240ec4.png)

---

<div class="post-metadata">

**Author:** ![peterkota](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/peterkota/32/35_2.png) [@peterkota](https://community.kinsta.com/u/peterkota)\
**Post date:** [January 27, 2021, 3:18pm UTC](https://community.kinsta.com/t/can-t-select-database/263/11 "2021-01-27T15:18:08Z")

</div>

@gerjo01 as I see the databases don’t exist. 🙁  
Can you remember the steps what you’ve made before? Have you pulled your sites from Kinsta? Have you deleted some Docker stuff manually?

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 3:47pm UTC](https://community.kinsta.com/t/can-t-select-database/263/12 "2021-01-27T15:47:19Z")

</div>

@peterkota I don’t really remember, because I don’t understand how to use Docker. Do I need to sign up, do I need to save something after I completed my work? I just closed everything once I was done.

I remember getting all these instructions to ente code when I first opened Docker. in like a sort of onboarding, I didn’t understand why, or what that was for. Then I started working in DevKinsta, that looked like my Kinsta area, and familiar, and I was able to install a theme and plugins. Then I stopped, by closing everything. Since it was saved in the Wordpress backend I thought everything was safe. When I tried to return to it this morning I got all this. but I don’t understand what I needed to do with Docker, and I didn’t saw anything in the user manual about it.

My idea is to create a new WordPress site, by download an existing one from My Kinsta, work on a new theme, change language, pricing etc and then add it My Kinsta again and connect it to a new URL, and upgrade to the 10 sites packages. But this ordeal made me quite scared. I liked the idea of DevKinsta so much I could work at it locally. But not understanding how to keep your data safe, and something like this happening makes me scared I’m going to lose many hours (again).

How can I avoid this from happening again? Do I need to delete everything and start over again?

This is what I see in DevKinsta:

 ![Screenshot 2021-01-27 at 16.42.19](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/8646bdcc08e7d6d666d2ce57117c8feb4655bee7.png)

---

<div class="post-metadata">

**Author:** ![peterkota](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/peterkota/32/35_2.png) [@peterkota](https://community.kinsta.com/u/peterkota)\
**Post date:** [January 27, 2021, 4:12pm UTC](https://community.kinsta.com/t/can-t-select-database/263/13 "2021-01-27T16:12:29Z")

</div>

@gerjo01 I’m sorry for that, We’ll try to investigate the cause of the issue.

In normal case you shouldn’t do anything in Docker.

I’ll get back to you if We find something.

---

<div class="post-metadata">

**Author:** ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)\
**Post date:** [January 27, 2021, 4:23pm UTC](https://community.kinsta.com/t/can-t-select-database/263/14 "2021-01-27T16:23:20Z")

</div>

> [@gerjo01](#):
>
> I don’t really remember, because I don’t understand how to use Docker. Do I need to sign up, do I need to save something after I completed my work? I just closed everything once I was done.

There’s no need to sign up for Docker. Changes to the site are saved and stored instantly so there’s no need to complete any other action.

> [@gerjo01](#):
>
> Do I need to delete everything and start over again?

Are you pulling an existing site on Kinsta? Please do and let us know if that helps.

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 4:44pm UTC](https://community.kinsta.com/t/can-t-select-database/263/15 "2021-01-27T16:44:16Z")

</div>

Right now I am just really scared I lose everything again, because there is no answer to why the database just disappeared like that.

---

<div class="post-metadata">

**Author:** ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)\
**Post date:** [January 27, 2021, 4:45pm UTC](https://community.kinsta.com/t/can-t-select-database/263/16 "2021-01-27T16:45:12Z")

</div>

I understand and very sorry for the trouble here. We’ll continue to investigate on our end.

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 27, 2021, 4:56pm UTC](https://community.kinsta.com/t/can-t-select-database/263/17 "2021-01-27T16:56:11Z")

</div>

Is the database stored locally? Where can I check if the database is safe and stored? Even when I close DevKinsta/Docker/the laptop?

---

<div class="post-metadata">

**Author:** ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)\
**Post date:** [January 27, 2021, 5:02pm UTC](https://community.kinsta.com/t/can-t-select-database/263/18 "2021-01-27T17:02:07Z")

</div>

That’s correct. The database is stored locally once the site is pulled from Kinsta onto your computer. [You can access the local database via Adminer](https://kinsta.com/knowledgebase/devkinsta/database-manager/). Information is stored automatically as you edit the site locally.

---

<div class="post-metadata">

**Author:** ![gerjo01](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gerjo01](https://community.kinsta.com/u/gerjo01)\
**Post date:** [January 28, 2021, 10:39am UTC](https://community.kinsta.com/t/can-t-select-database/263/19 "2021-01-28T10:39:42Z")

</div>

Update:  
I deleted everything, docker, DevKinsta.  
Then re-installed.  
Tried to import site from Kinsta, but I couldn’t get to it. Again all these database errors, before I realized the database login details are now ofcourse different so I changed them in wp-config but then still no luck I expect due to iThemes security (different login URL) and 2 factor authenticator. I just couldn’t reach the local site.

Then I thought I want to do this anyway to play around with a new theme and layout. So I decided to go from scratch with a new install, so I did.

Now I get the following error while trying to install the WooCommerce plugin:  
Installation failed: 504 Gateway Time-out 504 Gateway Time-out nginx

DevKinsta so far is not as easy play as is Live Kinsta hosting. While I was expecting it to be just a pleasant and clean as my experience with normal Kinsta kosting.

I’m also petrified to close it since I still have little trust my database will be saved correctly. For that would a back up plugin work with a local site? Like Backup buddy? In case something does go wrong again?

And what do I do about the 504 time out error?

---

<div class="post-metadata">

**Author:** ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)\
**Post date:** [January 28, 2021, 4:53pm UTC](https://community.kinsta.com/t/can-t-select-database/263/20 "2021-01-28T16:53:41Z")

</div>

I understand and very sorry for the trouble you’re having here.

> [@gerjo01](#):
>
> I’m also petrified to close it since I still have little trust my database will be saved correctly. For that would a back up plugin work with a local site? Like Backup buddy? In case something does go wrong again?

You can use a backup plugin locally if you wish, but recommend disabling or deleting it before pushing to Kinsta. Backups are already made on Kinsta itself automatically for you.

I do want to reiterate though the data will exist before and after closing DevKinsta. It’s generally safe to close out/exit DevKinsta and Docker and re-open with everything being there prior to exiting. The behavior is similar to your site on Kinsta itself in that changes to the database occur instantly. That said, if there are issues with the database where it’s deleted or removed as it occurred here then that’s a separate issue in which we are investigating.

---

<div class="post-metadata">

**Author:** ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)\
**Post date:** [March 3, 2021, 4:40pm UTC](https://community.kinsta.com/t/can-t-select-database/263/21 "2021-03-03T16:40:56Z")

</div>


