Answers.Body: <p><a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+the+database+using+phpMyAdmin" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+the+database+using+phpMyAdmin</a> </p>
  
  <p>I found this useful. Getting it done through phpMyAdmin</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-10T06:37:37.920Z
Answers.LastActivityDate: 2017-08-10T06:37:37.920Z
Answers.UserDisplayName: Parthibaraj Rajasekar
Answers.Body: <p>See documentation on moving an existing installation to a new server or location on this link: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-07T12:23:00.137Z
Answers.LastActivityDate: 2017-08-07T12:23:00.137Z
Answers.UserDisplayName: Kboy
Answers.Body: <p>It sounds like you didn't delete the existing CiviCRM MySQL database before importing the new one.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-07T14:52:10.867Z
Answers.Text: I think I deleted it. But which is the correct approach? 1 or 2?
Answers.UserDisplayName: Parthibaraj Rajasekar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-07T17:07:50.343Z
Answers.Text: Approach 1 is correct.  Please see the documentation that Kboy references for details.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-07T14:46:41.123Z
Answers.LastActivityDate: 2017-08-07T14:46:41.123Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I am trying to make a copy of my CiviCRM installation on WordPress in a different machine. I ma mainly trying this just as a practice for future upgrading of CiviCRM versions and also as a backup.</p>
  <p>I am caught up in a deadlock. both these options are failing. I don't which of the two options I should proceed with and how.</p>
  <p>In machine 2,</p>
  <ol>
  <li><p>I installed wordpress. created a database for Civicrm through PHPMyAdmin. copied the data from original database to new one. Activiating CiviCRM fails.</p>
  </li>
  <li><p>I installed wordpress. created a database for Civicrm through PHPMyAdmin. Activated CiviCRM. Tried copying the data alone from original database to new one. It fails with below error &quot; Duplicate entry '1' for key 'PRIMARY'&quot;</p>
  </li>
  </ol>
  <p>INSERT INTO <code>civicrm_acl</code> (<code>id</code>, <code>name</code>, <code>deny</code>, <code>entity_table</code>, <code>entity_id</code>, <code>operation</code>, <code>object_table</code>, <code>object_id</code>, <code>acl_table</code>, <code>acl_id</code>, <code>is_active</code>) VALUES
  (1, 'Edit All Contacts', 0, 'civicrm_acl_role', 1, 'Edit', 'civicrm_saved_search', 0, NULL, NULL, 1),
  (2, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
  (3, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access all custom data', NULL, NULL, NULL, 1),
  (4, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online contributions', NULL, NULL, NULL, 1),
  (5, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online pledges', NULL, NULL, NULL, 1),
  (6, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
  (7, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'view event info', NULL, NULL, NULL, 1),
  (8, 'Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'register for events', NULL, NULL, NULL, 1),
  (9, 'Core ACL', 0, 'civicrm_acl_[...]
  MySQL said: Documentation</p>
  <h1>1062 - Duplicate entry '1' for key 'PRIMARY'</h1>
  
Tags: <wordpress><database><installation><civicrm.settings.php>
Title: Copying the CiviCRM installation in a different machine
ThreadText: # Copying the CiviCRM installation in a different machine
  
  (Asked by: username_0 on 2017-08-07)
  
  I am trying to make a copy of my CiviCRM installation on WordPress in a different machine. I ma mainly trying this just as a practice for future upgrading of CiviCRM versions and also as a backup.
  
  I am caught up in a deadlock. both these options are failing. I don't which of the two options I should proceed with and how.
  
  In machine 2,
  
  1. I installed wordpress. created a database for Civicrm through PHPMyAdmin. copied the data from original database to new one. Activiating CiviCRM fails.
  2. I installed wordpress. created a database for Civicrm through PHPMyAdmin. Activated CiviCRM. Tried copying the data alone from original database to new one. It fails with below error " Duplicate entry '1' for key 'PRIMARY'"
  
  INSERT INTO `civicrm_acl` (`id`, `name`, `deny`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `acl_table`, `acl_id`, `is_active`) VALUES
  (1, 'Edit All Contacts', 0, 'civicrm\_acl\_role', 1, 'Edit', 'civicrm\_saved\_search', 0, NULL, NULL, 1),
  (2, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
  (3, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'access all custom data', NULL, NULL, NULL, 1),
  (4, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'make online contributions', NULL, NULL, NULL, 1),
  (5, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'make online pledges', NULL, NULL, NULL, 1),
  (6, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
  (7, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'view event info', NULL, NULL, NULL, 1),
  (8, 'Core ACL', 0, 'civicrm\_acl\_role', 0, 'All', 'register for events', NULL, NULL, NULL, 1),
  (9, 'Core ACL', 0, 'civicrm\_acl\_[...]
  MySQL said: Documentation
  
  # 1062 - Duplicate entry '1' for key 'PRIMARY'
  
  **Tags:** wordpress, database, installation, civicrm.settings.php
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2017-08-10. Score: 1 | Accepted answer
  
  <https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+the+database+using+phpMyAdmin>
  
  I found this useful. Getting it done through phpMyAdmin
  
  
  ---
  
  ### Answer by username_1 on 2017-08-07. Score: 3
  
  See documentation on moving an existing installation to a new server or location on this link: <https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location>
  
  
  ---
  
  ### Answer by username_2 on 2017-08-07. Score: 0
  
  It sounds like you didn't delete the existing CiviCRM MySQL database before importing the new one.
  
  > **Comments:**
  > **username_0**: I think I deleted it. But which is the correct approach? 1 or 2?  
  > **username_2**: Approach 1 is correct.  Please see the documentation that username_1 references for details.  
  
  ---
  
  