Answers.Body: <p>You'll need to use mysql or phpmyadmin or equivalent to run sql/civicrm_drop.mysql. You may also need to manually remove the civicrm_install_canary table.</p>
  
  <p>What it's technically complaining about is that you still have data in the civicrm_contact table.</p>
  
  <p><strong>UPDATE</strong> for more instructions using phpmyadmin: On the Import tab browse for the sql/civicrm_drop.mysql file and then click the Go button. You won't be able to browse on the server, so you'll need a copy of the civi download unzipped on your machine to browse for it.</p>
  
  <p>To drop civicrm_install_canary, go to the SQL tab and enter <code>DROP TABLE civicrm_install_canary</code> and click Go.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T00:45:22.217Z
Answers.Text: Thanks Demerit! However I'm not technically proficient in phpmyadmin to know how to run sql/civicrm_drop.mysql. Are you able to provide some step-by-step directions? Sorry to be such a newbie!
Answers.UserDisplayName: Tony Schmitz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T01:02:59.257Z
Answers.Text: Ok have updated answer.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T02:15:46.713Z
Answers.Text: Thanks for the detail.  I'll let you know if that works.
Answers.UserDisplayName: Tony Schmitz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-15T17:12:12.007Z
Answers.Text: That works to get a clean install of CiviCRM.  Perhaps my question should have stated that I want the data from the previous database. The previous database has all our contact information that I want to preserve when doing a reinstall of CiviCRM. Is there a way to "trick" Civi into loading the data from the previous database?
Answers.UserDisplayName: Tony Schmitz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-15T17:24:38.397Z
Answers.Text: I guess it depends why it quit working to begin with. If the problem was something wrong in the database then keeping it could be a problem. If the problem was something wrong with the files, then you'd be ok just replacing the files but then you'd want to keep civicrm.settings.php and NOT run the installer. If the original problem was something in civicrm.settings.php then you wouldn't want to delete anything you'd just want to fix civicrm.settings.php. If you have a running version somewhere you could export contacts and whatnot from the UI, then do clean install, then import.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-18T21:12:06.620Z
Answers.Text: The data I want is stored in database "wp230" I want that database to be used with new installation of CiviCRM
  step 1: deactivate then delete plugin CiviCRM from within Wordpress
  step 2: delete folder wpcontent/uploads/civicrm
  step 3: create new database "wtf1"
  step 4: upload plugin CiviCRM in Wordpress
  step 5: run installer and connect to database "wtf1"
  step 6: edit civicrm.settings.php to change database from "wtf1" to "wp230"
  step 7: refresh browser and CiviCRM loses all the resources along the top bar e.g. contacts, contributions, etc. DB Error:no such field
Answers.UserDisplayName: Tony Schmitz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-19T22:52:21.143Z
Answers.Text: That sounds like there is a problem with the original database, so trying to use it as-is in the new WP is going to be difficult. Find your ConfigAndLog folder (https://civicrm.stackexchange.com/questions/15931/where-are-the-configandlog-and-templates-c-directories) and in the log file in there there should be an error telling you which field it means when it says "DB Error: no such field".
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-19T23:04:56.633Z
Answers.Text: When I look for the ConfigAndLog folder in wp-content/uploads/civicrm that folder is empty. Is that because I did not finish the Installer?
Answers.UserDisplayName: Tony Schmitz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-19T23:17:03.450Z
Answers.Text: Hmm. Or maybe it crashed even before being able to write the file. Maybe also try https://chat.civicrm.org to get realtime help, under user-support.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-28T17:12:30.933Z
Answers.Text: UPDATE Turns out that I had updated the CiviCRM but the database had not been updated as well. Updating the database solved the issue.
Answers.UserDisplayName: Tony Schmitz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-13T21:12:36.660Z
Answers.LastActivityDate: 2020-04-14T01:02:49.723Z
Answers.LastEditDate: 2020-04-14T01:02:49.723Z
Answers.UserDisplayName: Demerit
Body: <p>I am reinstalling CiviCRM on Wordpress after Civi quit quit working.  I deleted the folder civicrm in /plugins and also in /uploads.  This allowed me to upload the new plugin version of Civi and took me to the CiviCRM Installer.  However, I get this message "CiviCRM data from previous installation exists in 'database_april'" which is the name of the database from my previous installation.  How can I get the Installer to allow connection to the prior database?
  Thanks for your help!</p>
  
Tags: <wordpress><database><installation>
Title: When reinstalling CiviCRM, it will not allow connection to a database with preexisting data
ThreadText: # When reinstalling CiviCRM, it will not allow connection to a database with preexisting data
  
  (Asked by: username_0 on 2020-04-13)
  
  I am reinstalling CiviCRM on Wordpress after Civi quit quit working. I deleted the folder civicrm in /plugins and also in /uploads. This allowed me to upload the new plugin version of Civi and took me to the CiviCRM Installer. However, I get this message "CiviCRM data from previous installation exists in 'database\_april'" which is the name of the database from my previous installation. How can I get the Installer to allow connection to the prior database?
  Thanks for your help!
  
  **Tags:** wordpress, database, installation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-04-13. Score: 2
  
  You'll need to use mysql or phpmyadmin or equivalent to run sql/civicrm\_drop.mysql. You may also need to manually remove the civicrm\_install\_canary table.
  
  What it's technically complaining about is that you still have data in the civicrm\_contact table.
  
  **UPDATE** for more instructions using phpmyadmin: On the Import tab browse for the sql/civicrm\_drop.mysql file and then click the Go button. You won't be able to browse on the server, so you'll need a copy of the civi download unzipped on your machine to browse for it.
  
  To drop civicrm\_install\_canary, go to the SQL tab and enter `DROP TABLE civicrm_install_canary` and click Go.
  
  > **Comments:**
  > **username_0**: Thanks username_1! However I'm not technically proficient in phpmyadmin to know how to run sql/civicrm_drop.mysql. Are you able to provide some step-by-step directions? Sorry to be such a newbie!  
  > **username_1**: Ok have updated answer.  
  > **username_0**: Thanks for the detail.  I'll let you know if that works.  
  > **username_0**: That works to get a clean install of CiviCRM.  Perhaps my question should have stated that I want the data from the previous database. The previous database has all our contact information that I want to preserve when doing a reinstall of CiviCRM. Is there a way to "trick" Civi into loading the data from the previous database?  
  > **username_1**: I guess it depends why it quit working to begin with. If the problem was something wrong in the database then keeping it could be a problem. If the problem was something wrong with the files, then you'd be ok just replacing the files but then you'd want to keep civicrm.settings.php and NOT run the installer. If the original problem was something in civicrm.settings.php then you wouldn't want to delete anything you'd just want to fix civicrm.settings.php. If you have a running version somewhere you could export contacts and whatnot from the UI, then do clean install, then import.  
  > **username_0**: The data I want is stored in database "wp230" I want that database to be used with new installation of CiviCRM step 1: deactivate then delete plugin CiviCRM from within Wordpress step 2: delete folder wpcontent/uploads/civicrm step 3: create new database "wtf1" step 4: upload plugin CiviCRM in Wordpress step 5: run installer and connect to database "wtf1" step 6: edit civicrm.settings.php to change database from "wtf1" to "wp230" step 7: refresh browser and CiviCRM loses all the resources along the top bar e.g. contacts, contributions, etc. DB Error:no such field  
  > **username_1**: That sounds like there is a problem with the original database, so trying to use it as-is in the new WP is going to be difficult. Find your ConfigAndLog folder (https://civicrm.stackexchange.com/questions/15931/where-are-the-configandlog-and-templates-c-directories) and in the log file in there there should be an error telling you which field it means when it says "DB Error: no such field".  
  > **username_0**: When I look for the ConfigAndLog folder in wp-content/uploads/civicrm that folder is empty. Is that because I did not finish the Installer?  
  > **username_1**: Hmm. Or maybe it crashed even before being able to write the file. Maybe also try https://chat.civicrm.org to get realtime help, under user-support.  
  > **username_0**: UPDATE Turns out that I had updated the CiviCRM but the database had not been updated as well. Updating the database solved the issue.  
  
  ---
  
  