# Cannot connect to database

**URL:** <https://community.kinsta.com/t/cannot-connect-to-database/2014>\
**Category:** Application Support\
**Created:** [January 21, 2023, 2:00am UTC](https://community.kinsta.com/t/cannot-connect-to-database/2014 "2023-01-21T02:00:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Foley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/dan_foley/32/1808_2.png) [@Dan\_Foley](https://community.kinsta.com/u/Dan_Foley)\
**Post date:** [January 21, 2023, 2:00am UTC](https://community.kinsta.com/t/cannot-connect-to-database/2014/1 "2023-01-21T02:00:03Z")

</div>

my site was running really really slow, so I changed docker from using wsl to use hyper v. Now I cannot connect to my database. Using the user root and the password dev kinsta says to use.

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [January 23, 2023, 8:55am UTC](https://community.kinsta.com/t/cannot-connect-to-database/2014/2 "2023-01-23T08:55:21Z")

</div>

Hey @Dan_Foley ,

Can you please test the mysql connections by doing the following:

1. Open Docker and click on the three dots menu of the devkinsta\_db container
2. Click on Open in terminal  
 ![Screenshot_2023-01-23_at_08_49_12](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/b/bf95689559d8b4a571656d29abf4aed0d11ea6c8.png)

Once there, use this command being sure to update `PASSWORD`, `DATABASEPORT` and `DATABASENAME` with those you see inside DevKinsta

`mysql -u root -pPASSWORD -h localhost -PDATABASEPORT DATABASENAME`

What does the terminal reply with?

Regards,

Alessandro
