Answers.Body: <p>Depending on your end goal, one solution is to set the External ID of a record in instance B, to the Internal ID from instance A. </p>
  
  <p>The Internal ID (civicrm_contact.id) is a primary key; the database engine assigns that field, and you risk data corruption by trying to keep it in sync yourself. The reliable way to keep them in sync is to have instance B act as a <a href="http://dev.mysql.com/doc/refman/5.5/en/replication-howto.html">Replication Slave of instance A</a>, where data changes in A are copied to B (but not vice versa).</p>
  
  <p>If you can tell us more about what you are actually trying to achieve (<em>as a new question</em>), perhaps we can help you with the greater goal.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-01T13:45:45.340Z
Answers.LastActivityDate: 2015-06-01T13:45:45.340Z
Answers.UserDisplayName: Nicholai
Answers.Body: <p>Agree with Nicholai. Another option might be to create a custom group with a field that holds the key in the 'other' CiviCRM? We have used that to sync with another package. But more detail might help? Should the CiviCRM ID's be the same on both installations or should you be able to sync? Does make a difference...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-03T13:01:44.600Z
Answers.Text: I do not want to sync, the CiviCRM ID's should be the same on both installations. I think i'm going with Nicholai's idea, the external ID of B should be equal to the CiviCRM ID of A.
Answers.UserDisplayName: Kboy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-02T06:33:51.180Z
Answers.LastActivityDate: 2015-06-02T06:33:51.180Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I have two instances of CiviCRM, not all the CiviCRM ID's match. How can i get the contacts on both databases to have the same CiviCRM ID (ie CiviCRM ID of contact A in db1 = CiviCRM ID of contact A in db2)?. The use case is as follows:</p>
  
  <p>I have two civi dbs (I will refer to them as A and B, and they are not in sync), B is a copy of A, A is open to public for events registration, B is restricted only to internal network and is used for projects. Data in B is seen as more up to date and reliable because it is entered by staff. I don't want to sync B to A because they have unrelated activities. I want to pull data from A for reporting and if some fields are empty in A (e.g. date of birth), get this data from B if CiviCRM ID A = CiviCRM ID B</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-01T16:27:45.533Z
Comments.Text: Would help folks give a better answer if you can describe your use case and why you desire the above feature
Comments.UserDisplayName: Donald Lobo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-01T19:46:23.893Z
Comments.Text: Thanks Lobo, I will try to explain as much as i can. I have two civi dbs (I will refer to them as A and B, and they are not in sync), B is a copy of A, A is open to public for events registration, B is restricted only to internal network and is used for  projects. Data in B is seen as more up to date and reliable because it is entered by staff. I don't want to sync B to A because they have unrelated activities. I want to pull data from A for reporting and if some fields are empty in A (e.g. date of birth), get this data from B if CiviCRM ID A = CiviCRM ID B.
Comments.UserDisplayName: Kboy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-01T20:00:42.963Z
Comments.Text: I incorporated the comment into the question
Comments.UserDisplayName: Donald Lobo
Tags: <contacts><mysql>
Title: How can i match CiviCRM ID on two installations?
ThreadText: # How can i match CiviCRM ID on two installations?
  
  (Asked by: username_0 on 2015-06-01)
  
  I have two instances of CiviCRM, not all the CiviCRM ID's match. How can i get the contacts on both databases to have the same CiviCRM ID (ie CiviCRM ID of contact A in db1 = CiviCRM ID of contact A in db2)?. The use case is as follows:
  
  I have two civi dbs (I will refer to them as A and B, and they are not in sync), B is a copy of A, A is open to public for events registration, B is restricted only to internal network and is used for projects. Data in B is seen as more up to date and reliable because it is entered by staff. I don't want to sync B to A because they have unrelated activities. I want to pull data from A for reporting and if some fields are empty in A (e.g. date of birth), get this data from B if CiviCRM ID A = CiviCRM ID B
  
  **Tags:** contacts, mysql
  
  > **Comments:**
  > **username_1**: Would help folks give a better answer if you can describe your use case and why you desire the above feature  
  > **username_0**: Thanks Lobo, I will try to explain as much as i can. I have two civi dbs (I will refer to them as A and B, and they are not in sync), B is a copy of A, A is open to public for events registration, B is restricted only to internal network and is used for  projects. Data in B is seen as more up to date and reliable because it is entered by staff. I don't want to sync B to A because they have unrelated activities. I want to pull data from A for reporting and if some fields are empty in A (e.g. date of birth), get this data from B if CiviCRM ID A = CiviCRM ID B.  
  > **username_1**: I incorporated the comment into the question  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-06-01. Score: 5
  
  Depending on your end goal, one solution is to set the External ID of a record in instance B, to the Internal ID from instance A.
  
  The Internal ID (civicrm\_contact.id) is a primary key; the database engine assigns that field, and you risk data corruption by trying to keep it in sync yourself. The reliable way to keep them in sync is to have instance B act as a [Replication Slave of instance A](http://dev.mysql.com/doc/refman/5.5/en/replication-howto.html), where data changes in A are copied to B (but not vice versa).
  
  If you can tell us more about what you are actually trying to achieve (*as a new question*), perhaps we can help you with the greater goal.
  
  
  ---
  
  ### Answer by username_3 on 2015-06-02. Score: 0
  
  Agree with username_2. Another option might be to create a custom group with a field that holds the key in the 'other' CiviCRM? We have used that to sync with another package. But more detail might help? Should the CiviCRM ID's be the same on both installations or should you be able to sync? Does make a difference...
  
  > **Comments:**
  > **username_0**: I do not want to sync, the CiviCRM ID's should be the same on both installations. I think i'm going with username_2's idea, the external ID of B should be equal to the CiviCRM ID of A.  
  
  ---
  
  