1

Trying to make a local copy of a live ExpressionEngine site, my process stop when importing the live database. I'm using EE 2.5.5 and several key add-ons like Publisher, Playa, Matrix and CE Cache. I made the import using Sequel Pro and I just click "Ignore errors".

I can see the control panel and everything seems to be OK in the backend. I noticed though that I have to install all the add-ons.

But then, these are the MySQL errors I got when importing:

[ERROR in query 52] Duplicate entry '5' for key 'PRIMARY'
[ERROR in query 72] Unknown column 'field_id_2' in 'field list'
[ERROR in query 73] Unknown column 'field_id_2' in 'field list'
[ERROR in query 74] Unknown column 'field_id_2' in 'field list'
[ERROR in query 75] Unknown column 'field_id_2' in 'field list'
[ERROR in query 76] Unknown column 'field_id_2' in 'field list'
[ERROR in query 77] Unknown column 'field_id_2' in 'field list'
[ERROR in query 78] Unknown column 'field_id_2' in 'field list'
[ERROR in query 79] Unknown column 'field_id_2' in 'field list'
[ERROR in query 80] Unknown column 'field_id_2' in 'field list'
[ERROR in query 81] Unknown column 'field_id_2' in 'field list'
[ERROR in query 82] Unknown column 'field_id_2' in 'field list'
[ERROR in query 83] Unknown column 'field_id_2' in 'field list'
[ERROR in query 84] Unknown column 'field_id_2' in 'field list'
[ERROR in query 85] Unknown column 'field_id_2' in 'field list'
[ERROR in query 86] Unknown column 'field_id_2' in 'field list'
[ERROR in query 87] Unknown column 'field_id_2' in 'field list'
[ERROR in query 88] Unknown column 'field_id_2' in 'field list'
[ERROR in query 89] Unknown column 'field_id_2' in 'field list'
[ERROR in query 90] Unknown column 'field_id_2' in 'field list'
[ERROR in query 91] Unknown column 'field_id_2' in 'field list'
[ERROR in query 92] Unknown column 'field_id_2' in 'field list'
[ERROR in query 93] Unknown column 'field_id_2' in 'field list'
[ERROR in query 94] Unknown column 'field_id_2' in 'field list'
[ERROR in query 95] Unknown column 'field_id_2' in 'field list'
[ERROR in query 96] Unknown column 'field_id_2' in 'field list'
[ERROR in query 97] Unknown column 'field_id_2' in 'field list'
[ERROR in query 98] Unknown column 'field_id_2' in 'field list'
[ERROR in query 99] Unknown column 'field_id_2' in 'field list'
[ERROR in query 100] Unknown column 'field_id_2' in 'field list'
[ERROR in query 101] Unknown column 'field_id_2' in 'field list'
[ERROR in query 102] Unknown column 'field_id_2' in 'field list'
[ERROR in query 103] Unknown column 'field_id_2' in 'field list'
[ERROR in query 104] Unknown column 'field_id_2' in 'field list'
[ERROR in query 105] Unknown column 'field_id_2' in 'field list'
[ERROR in query 106] Unknown column 'field_id_2' in 'field list'
[ERROR in query 107] Unknown column 'field_id_2' in 'field list'
[ERROR in query 108] Unknown column 'field_id_2' in 'field list'
[ERROR in query 109] Unknown column 'field_id_2' in 'field list'
[ERROR in query 110] Unknown column 'field_id_2' in 'field list'
[ERROR in query 111] Unknown column 'field_id_2' in 'field list'
[ERROR in query 112] Unknown column 'field_id_2' in 'field list'
[ERROR in query 113] Unknown column 'field_id_2' in 'field list'
[ERROR in query 114] Unknown column 'field_id_2' in 'field list'
[ERROR in query 115] Unknown column 'field_id_2' in 'field list'
[ERROR in query 130] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 141] Duplicate entry '2' for key 'PRIMARY'
[ERROR in query 143] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 183] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 362] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 365] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 368] Duplicate entry '1-1' for key 'PRIMARY'
[ERROR in query 370] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 379] Duplicate entry '3' for key 'PRIMARY'
[ERROR in query 724] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 726] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 737] Unknown column 'sess_start' in 'field list'
[ERROR in query 739] Unknown column 'site_pages' in 'field list'
[ERROR in query 743] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 748] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 750] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 752] Duplicate entry '1' for key 'PRIMARY'
[ERROR in query 786] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

My concern is that this is going to create problems in my local site, which I need to be in pretty good shape as next step is going into Git workflow and deploy changes to remote, etc.

Any idea?

Sergio

4
  • You're having to reinstall addons on local after downloading files and DB from productions?
    – Anna_MediaGirl
    Commented Oct 29, 2013 at 20:08
  • I can see that, after downloading all files and DB from production add-ons are not installed. Commented Oct 29, 2013 at 20:19
  • Are you deleting the tables in your local database before importing the new SQL?
    – Anna_MediaGirl
    Commented Oct 29, 2013 at 20:24
  • 1
    Like Anna has suggested, drop all tables in the local db first before you import from production. Commented Oct 29, 2013 at 20:26

1 Answer 1

3

You should never have to reinstall addons locally if you are pulling files/DB from production properly. If you are having this problem, the issue is most likely related to how you are doing the migration.

I'd suggest your errors are caused by your exported SQL not including DROP TABLE and you aren't manually dropping the tables in the DB before your import.


To test my theory, delete all tables in your local DB and then do the import... Same errors?

If no errors, then you'll need to manually drop tables before importing or get your import to include the DROP TABLE syntax.

3
  • 1
    I tested your theory: I got my import including the DROP TABLE. It seems to be working nicely! Commented Oct 29, 2013 at 23:28
  • Hi Anna, thanks for your help here. Front and backend are working with no problems. I only got one alert when importing the production db with drop table syntax: [ERROR in query 912] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Any idea? Commented Oct 30, 2013 at 8:57
  • Can you post a new question with the new details? Include the first couple of lines of sql.
    – Anna_MediaGirl
    Commented Oct 30, 2013 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.