# Database error importing site

**URL:** https://community.localwp.com/t/database-error-importing-site/21336
**Category:** Support
**Tags:** site-import
**Created:** [November 4, 2019, 8:29am UTC](https://community.localwp.com/t/database-error-importing-site/21336 "2019-11-04T08:29:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![soldier99](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/soldier99/32/30_2.png) [@soldier99](https://community.localwp.com/u/soldier99)
#### Post date: [November 4, 2019, 8:29am UTC](https://community.localwp.com/t/database-error-importing-site/21336/1 "2019-11-04T08:29:09Z")

</div>

Since today I have the same issue.

Local Lightning 5.0.7 and OSX Catalina.

> Error: Command failed: /Applications/Local.app/Contents/Resources/extraResources/site-binaries/mysql-8.0.15/bin/mysql --default-character-set=utf8 -A --skip-column-names -e SET names ‘utf8’; use local; source /Users/username/Documents/Websites/test/app/sql/local.wp\_cf\_forms.sql;
> 
> ERROR 1062 (23000) at line 4 in file: ‘/Users/username/Documents/Websites/test/app/sql/local.wp\_cf\_forms.sql’: Duplicate entry ‘1’ for key ‘PRIMARY’

---

<div class="post-metadata">

### Author: ![mattwhosthat](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/mattwhosthat/32/7794_2.png) [@mattwhosthat](https://community.localwp.com/u/mattwhosthat)
#### Post date: [November 6, 2019, 9:49pm UTC](https://community.localwp.com/t/database-error-importing-site/21336/2 "2019-11-06T21:49:33Z")

</div>

@soldier99, it looks like there is an issue with the `local.wp_cf_forms.sql` file.

You might try pulling that from the folder, zipping it up and importing it again. You’ll probably need to look at the SQL syntax to see if there is an issue with the Primary key in that table.

---

<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: [August 6, 2020, 5:41pm UTC](https://community.localwp.com/t/database-error-importing-site/21336/3 "2020-08-06T17:41:04Z")

</div>

Hey @soldier99 – were you able to get this site imported correctly?

---

<div class="post-metadata">

### Author: ![soldier99](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/soldier99/32/30_2.png) [@soldier99](https://community.localwp.com/u/soldier99)
#### Post date: [August 6, 2020, 5:53pm UTC](https://community.localwp.com/t/database-error-importing-site/21336/4 "2020-08-06T17:53:03Z")

</div>

No. I just created a new site and started fresh.

---

<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: [August 6, 2020, 5:54pm UTC](https://community.localwp.com/t/database-error-importing-site/21336/5 "2020-08-06T17:54:10Z")

</div>

Thanks for following up and letting us know. Let us know if you need any other help, otherwise have a great day!

---

<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: [November 4, 2020, 5:54pm UTC](https://community.localwp.com/t/database-error-importing-site/21336/6 "2020-11-04T17:54:14Z")

</div>

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