# Can't import database via Adminer nor via site shell

**URL:** <https://community.localwp.com/t/cant-import-database-via-adminer-nor-via-site-shell/41174>\
**Category:** Support\
**Tags:** windows\
**Created:** [February 3, 2024, 4:30am UTC](https://community.localwp.com/t/cant-import-database-via-adminer-nor-via-site-shell/41174 "2024-02-03T04:30:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ams221](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ams221/32/20818_2.png) [@ams221](https://community.localwp.com/u/ams221)\
**Post date:** [February 3, 2024, 4:30am UTC](https://community.localwp.com/t/cant-import-database-via-adminer-nor-via-site-shell/41174/1 "2024-02-03T04:30:57Z")

</div>

### What issue or error are you experiencing?

**I’m trying to import a site to Local manually.**

I already:

1. Created a blank site on Local
2. Replaced the wp-content folder with the new one

_The issue is the database import_. I exported the database from the site I want to import, which is a 175 MB .sql file. Here is what I’ve tried:

**Adminer**  
If I try to import it via Adminer, I get a memory error:

**Fatal error** : Allowed memory size of 268435456 bytes exhausted (tried to allocate 183724600 bytes) in **C:\Users\*** _\AppData\Local\Programs\Local\resources\extraResources\adminer\adminer.php_\* on line **100**

I already increased the memory\_limit on php.ini to 3000M and I still get the same error.

**Site Shell**

I pasted the .sql file on the /public folder and ran the following command on the siteshell (local.sql is the file name of the db I’m trying to import):  
wp db import local.sql

When I run it, I get this error: Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

* * *

### What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

* * *

### System Details

- **Local Version:** Version 8.2.1+6583

- **Operating System (OS) and OS version:** Windows 11 Home version 22H2

* * *

### Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/))  
[local-lightning.log](https://community.localwp.com/uploads/short-url/bkLEdupYLzQl6DDYRq8fkmIEL5X.log) (246.1 KB)

* * *

_ **Security Reminder** _  
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

---

<div class="post-metadata">

**Author:** ![ams221](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ams221/32/20818_2.png) [@ams221](https://community.localwp.com/u/ams221)\
**Post date:** [February 3, 2024, 4:50am UTC](https://community.localwp.com/t/cant-import-database-via-adminer-nor-via-site-shell/41174/2 "2024-02-03T04:50:45Z")

</div>

I managed to solve it using this workaround: [PHP memory limit error when importing / Failed to get current SQL modes. Reason: ERROR 2003 (HY000) - #13 by buzztone](https://community.localwp.com/t/php-memory-limit-error-when-importing-failed-to-get-current-sql-modes-reason-error-2003-hy000/40130/13)

---

<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:** [February 3, 2024, 2:19pm UTC](https://community.localwp.com/t/cant-import-database-via-adminer-nor-via-site-shell/41174/3 "2024-02-03T14:19:26Z")

</div>

@ams221 Glad to hear you got things fixed up! Thank you for sharing the solution here for others. 💚

---

<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:** [February 5, 2024, 2:20am UTC](https://community.localwp.com/t/cant-import-database-via-adminer-nor-via-site-shell/41174/4 "2024-02-05T02:20:13Z")

</div>

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