# Error estabilishing a database connection while importing site to local

**URL:** <https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056>\
**Category:** Support\
**Tags:** windows-10\
**Created:** [October 17, 2024, 1:14am UTC](https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056 "2024-10-17T01:14:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flynn](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/flynn/32/22924_2.png) [@flynn](https://community.localwp.com/u/flynn)\
**Post date:** [October 17, 2024, 1:14am UTC](https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056/1 "2024-10-17T01:14:51Z")

</div>

Hello. I’m new to local. I have a backup of a site that used to be live on EasyWP but I won’t be using it for a while, so I’m trying to move it to local to make changes. I’m manually importing the site following this guide [Import/Export a WordPress Site - Local](https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/) bc I get a zip error. I’m facing the error mentioned in the topic:

### What issue or error are you experiencing?

I’m adding a screenshot of the error:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/7/2/727892f4ad2d3494fd083bf85d270b228ca5426f.png)

I already replaced the wp-content folder with the one downloaded from EasyWP. Idk how to check if the DB change was actually applied, since there’s a SQL folder with a local.sql file. I put my DB _inside_ the app\>public folder

### System Details

- **Local Version:** Version 9.1.0+6719

- **Operating System (OS) and OS version:** Windows 10 Pro 22H2

* * *

### Local Logs

Attach your Local Logs here  
[local-logs.zip](https://community.localwp.com/uploads/short-url/tNckhlcnWZneJJKbaWaHT0ahzGt.zip) (32.0 KB)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 17, 2024, 2:54pm UTC](https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056/2 "2024-10-17T14:54:18Z")

</div>

Hey @flynn!

A couple quick things to check here:

A firewall or antivirus software could block MySQL from running correctly. Can you double check that MySQL is allowed through your Windows Firewall?

On Windows, another thing is to make sure that WordPress has the correct file permissions to access the database. Can you make sure that your user account or the user running the web server has sufficient permissions for the WordPress files and MySQL data files?

Keep us posted and we’d be happy to help further!

---

<div class="post-metadata">

**Author:** ![flynn](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/flynn/32/22924_2.png) [@flynn](https://community.localwp.com/u/flynn)\
**Post date:** [October 25, 2024, 7:24pm UTC](https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056/3 "2024-10-25T19:24:57Z")

</div>

Hi @Nick-B !

I added mysql to the firewall as shown here, but the issue persists:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/6/a/6a5853b08d6312cdbd0873eb08e2a0b7d0266313.png)

Also, this is my admin user and I can access MySQL on the cmd without issue, but when I try to run the same comment in the local shell, I get this:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/d/a/da4fb40283bb7d610fc3759ed279d8680590e5a0.png)

I’m not sure what this means. Does it mean that port 10061 is not open? Maybe I’m missing some permissions, but I don’t know how to check more details.

Let me know any tips, thanks 🙂

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 28, 2024, 1:29pm UTC](https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056/4 "2024-10-28T13:29:43Z")

</div>

You could try opening your task manager to see if there are multiple mysql processes running, or you could just kill everything in there, then Start your site and see if works then.

 ![taskmanager](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/d/0/d00b62d3f9a523024539bb519e662bbef98265e1.png)

For more on investigating Port Conflicts, you can check out our help article below. Something else that could be conflicting would be if you’re running other dev applications simultaneously. Like XAMP, Docker, etc.

> **[What is Router Mode?](https://localwp.com/help-docs/advanced/router-mode/)**
>
> Router Mode is Local’s way of offering the best offline development experience possible while still “playing nice” with other, similar development applications.

---

<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:** [January 26, 2025, 1:29pm UTC](https://community.localwp.com/t/error-estabilishing-a-database-connection-while-importing-site-to-local/45056/5 "2025-01-26T13:29:50Z")

</div>

Closed on January 26, 2025, 1:29pm UTC

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