Answers.Body: <p>This is what works for me but not sure if it is necessary based on the following <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location">http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location</a> :</p>
  
  <ol>
  <li>Edit civicrm.settings.php with new database info</li>
  <li>Delete all template files in templates_c/</li>
  <li>Make sure there are no references to civicrm database in drupal setttings.php</li>
  <li>Clear database caches and session tables</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-11T06:51:54.023Z
Answers.Text: Thanks everyone. The answer by @Sonicthoughts worked like a charm. Cheers.
Answers.UserDisplayName: Sohal Khatwani
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-08T19:15:48.303Z
Answers.LastActivityDate: 2015-07-08T19:15:48.303Z
Answers.UserDisplayName: Sonicthoughts
Body: <p>When setting up a website with CiviCRM I named the database in a extremely generic format. How can I rename it with breaking Civi? I tried to export the date and import it to a new database with a different name and change the civicrm.settings.php file but that did not work. </p>
  
  <p>Any suggestions would be helpful.  </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-24T15:05:34.207Z
Comments.Text: Why would you want to rename the CiviCRM database? I assume you can not re-install and use a different name when installing?
Comments.UserDisplayName: ErikH - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-24T15:49:01.923Z
Comments.Text: Editing civicrm.settings.php SHOULD work.  I routinely move databases from a development to production server, where the database name is different, and the only difference is in civicrm.settings.php.  Please update your question with more details about what the error you're receiving is, and what changes you made?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-24T22:17:58.170Z
Comments.Text: In order for anyone to reply with insight, you'll need to give more details than this about your situation. Eg instead of _"that did not work"_ you might say _"when importing the DB I saw error: ..."_, _"the DB loaded but when visiting the site I saw a DB error message: ..."_ or _"the site continued to display data from the original DB"_
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-26T04:36:08.810Z
Comments.Text: We have a fixed codebase we use for some of our sites. Jon, your comments are exactly what I expected to happen but the site broke. I did this a few weeks back so I am going to try to replicate the exact error and add the details here.
Comments.UserDisplayName: Sohal Khatwani
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-26T09:14:41.397Z
Comments.Text: Did you rename your CMS database as well? Are they sharing the same one? If either of these is yes, you might need to change settings.php (on Drupal, or equivalent) too.
Comments.UserDisplayName: DaveFF
Tags: <civicrm.settings.php>
Title: How do I change the CiviCRM Database name
ThreadText: # How do I change the CiviCRM Database name
  
  (Asked by: username_0 on 2015-06-24)
  
  When setting up a website with CiviCRM I named the database in a extremely generic format. How can I rename it with breaking Civi? I tried to export the date and import it to a new database with a different name and change the civicrm.settings.php file but that did not work.
  
  Any suggestions would be helpful.
  
  **Tags:** civicrm.settings.php
  
  > **Comments:**
  > **username_1**: Why would you want to rename the CiviCRM database? I assume you can not re-install and use a different name when installing?  
  > **username_2**: Editing civicrm.settings.php SHOULD work.  I routinely move databases from a development to production server, where the database name is different, and the only difference is in civicrm.settings.php.  Please update your question with more details about what the error you're receiving is, and what changes you made?  
  > **username_3**: In order for anyone to reply with insight, you'll need to give more details than this about your situation. Eg instead of _"that did not work"_ you might say _"when importing the DB I saw error: ..."_, _"the DB loaded but when visiting the site I saw a DB error message: ..."_ or _"the site continued to display data from the original DB"_  
  > **username_0**: We have a fixed codebase we use for some of our sites. Jon, your comments are exactly what I expected to happen but the site broke. I did this a few weeks back so I am going to try to replicate the exact error and add the details here.  
  > **username_4**: Did you rename your CMS database as well? Are they sharing the same one? If either of these is yes, you might need to change settings.php (on Drupal, or equivalent) too.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_5 on 2015-07-08. Score: 6 | Accepted answer
  
  This is what works for me but not sure if it is necessary based on the following <http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location> :
  
  1. Edit civicrm.settings.php with new database info
  2. Delete all template files in templates\_c/
  3. Make sure there are no references to civicrm database in drupal setttings.php
  4. Clear database caches and session tables
  
  > **Comments:**
  > **username_0**: Thanks everyone. The answer by @username_5 worked like a charm. Cheers.  
  
  ---
  
  