# Connect to Local database from Windows WSL

**URL:** <https://community.localwp.com/t/connect-to-local-database-from-windows-wsl/23182>\
**Category:** Support\
**Created:** [December 1, 2020, 12:00am UTC](https://community.localwp.com/t/connect-to-local-database-from-windows-wsl/23182 "2020-12-01T00:00:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllBrevard](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@AllBrevard](https://community.localwp.com/u/AllBrevard)\
**Post date:** [December 1, 2020, 12:00am UTC](https://community.localwp.com/t/connect-to-local-database-from-windows-wsl/23182/1 "2020-12-01T00:00:14Z")

</div>

Greetings, Running Local 5.9.3 and everything works as expected.

Connecting to the Local database from Windows WSL. When using WP-CLI in WSL, I can connect with DB\_HOST defined in a .yml file:  
`define('DB_HOST', '127.0.0.1:{PORT}');`

The DB queries from WP-CLI are very slow; about 8X slower than expected. Can anyone suggest a way to debug or correct this problem? Thanks…

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [March 1, 2021, 12:00am UTC](https://community.localwp.com/t/connect-to-local-database-from-windows-wsl/23182/2 "2021-03-01T00:00:17Z")

</div>

Closed on March 1, 2021, 12:00am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
