# Trouble importing a database

**URL:** <https://community.localwp.com/t/trouble-importing-a-database/43000>\
**Category:** Support\
**Created:** [May 21, 2024, 5:53pm UTC](https://community.localwp.com/t/trouble-importing-a-database/43000 "2024-05-21T17:53:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightmaresinclr](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@nightmaresinclr](https://community.localwp.com/u/nightmaresinclr)\
**Post date:** [May 21, 2024, 5:53pm UTC](https://community.localwp.com/t/trouble-importing-a-database/43000/1 "2024-05-21T17:53:14Z")

</div>

I have a website hosted on DreamHost that I’d like to run from Local. I’ve created an archive of the site using Duplicator, but when importing the archive into Local I run into a database error. This is what appears in the logs:

`"stack":"Error: ERROR at line 24: ASCII '\\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\\0' is expected.`

When I’ve looked up the issue, I mainly see people recommending to unzip the file before importing, but as far as I can tell that does not seem to work for running on Local. Is there something else that can be done? Where would I set --binary-mode in the first place?

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [May 22, 2024, 3:35pm UTC](https://community.localwp.com/t/trouble-importing-a-database/43000/2 "2024-05-22T15:35:36Z")

</div>

Hey @nightmaresinclr – Welcome to the Local community!

That error does seem to indicate that the data in the database is of an older format and may be causing issues when importing into Local.

In terms of how to manually install a WordPress site within Local, we have this help doc which goes over that process:

- [Import/Export a WordPress Site - Local](https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/#Manually-Import-a-Local-site)

The main difference would be that instead of the wpcli command in the help doc, I think you’ll need to use the raw MySQL command, using the `DB_NAME`, `DB_USER`, and `DB_PASSWORD` that are set in the wp-config.php file. By default, Local sites use `local`, `root` and `root` for those values, so instead of:

```auto
wp db import your-database-filename.sql

```

I think you’d want something like this (using the actual name of the sql file):

```auto
mysql --binary-mode -uroot -proot local < database-dump.sql

```

Hope that helps give you a little direction! Let us know how it goes!

---

<div class="post-metadata">

**Author:** ![nightmaresinclr](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@nightmaresinclr](https://community.localwp.com/u/nightmaresinclr)\
**Post date:** [May 22, 2024, 7:17pm UTC](https://community.localwp.com/t/trouble-importing-a-database/43000/3 "2024-05-22T19:17:17Z")

</div>

I imported manually and it looks good! Thanks so much for the direction!

---

<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:** [May 24, 2024, 2:48pm UTC](https://community.localwp.com/t/trouble-importing-a-database/43000/4 "2024-05-24T14:48:04Z")

</div>

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