Body: <p>I'm trying to install Drupal and CiviCRM in a local development environment and I keep running into this issue:</p>
  <pre><code>[Exception] CiviCRM appears to have already been installed. Skipping full installation.
  </code></pre>
  <p>If I remove the <code>civicrm</code> database and <code>civicrm.settings.php</code> I can install Drupal and CiviCRM.</p>
  <p>This is my current script:</p>
  <pre><code>mv web/sites/default/civicrm.settings.php web/sites/default/civicrm.settings.php.bkp
  mysql -uroot -proot -hdb -e &quot;DROP DATABASE IF EXISTS civicrm; CREATE DATABASE civicrm; GRANT ALL ON civicrm.* TO 'db'@'%';&quot;
  drush site:install minimal --existing-config --account-name=admin --account-pass=password --yes
  drush pmu gvote_sync
  mv web/sites/default/civicrm.settings.php.bkp web/sites/default/civicrm.settings.php
  </code></pre>
  <p>I understand requiring a clean database, but it seems like there's a use case for installing CiviCRM with an existing settings file.
  Is there a different way I should be doing this?</p>
  <p>For context we have a large amount of Drupal Config saved in <code>config/sync</code> that we would like to import. As well as a bunch of CiviCRM config defined in code.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-21T18:11:35.247Z
Comments.Text: i am probably misunderstanding, but having created 'clean' database, is there something preventing you then loading a backup of your existing db in to it? (using the skip triggers options eg https://civicrm.stackexchange.com/a/620/96
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-21T19:53:17.073Z
Comments.Text: Yeah, good question. The size of our production database is ~20GB and we're sharing this development environment with volunteers and contractors that we don't want to have access to our production data
Comments.UserDisplayName: IanEdington
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-22T02:42:17.100Z
Comments.Text: If you are needing eg Custom Fields in the db, and Custom Activity Types then you may need to look at https://github.com/CiviCooP/org.civicoop.configitems
Comments.UserDisplayName: petednz - fuzion
Tags: <drupal><installation>
Title: CRM_Core_Exception: Database lock encountered in Mailing/Controller/Send.php on line 51
ThreadText: # CRM_Core_Exception: Database lock encountered in Mailing/Controller/Send.php on line 51
  
  (Asked by: username_0 on 2024-10-21)
  
  I'm trying to install Drupal and CiviCRM in a local development environment and I keep running into this issue:
  
  ```
  [Exception] CiviCRM appears to have already been installed. Skipping full installation.
  
  ```
  
  If I remove the `civicrm` database and `civicrm.settings.php` I can install Drupal and CiviCRM.
  
  This is my current script:
  
  ```
  mv web/sites/default/civicrm.settings.php web/sites/default/civicrm.settings.php.bkp
  mysql -uroot -proot -hdb -e "DROP DATABASE IF EXISTS civicrm; CREATE DATABASE civicrm; GRANT ALL ON civicrm.* TO 'db'@'%';"
  drush site:install minimal --existing-config --account-name=admin --account-pass=password --yes
  drush pmu gvote_sync
  mv web/sites/default/civicrm.settings.php.bkp web/sites/default/civicrm.settings.php
  
  ```
  
  I understand requiring a clean database, but it seems like there's a use case for installing CiviCRM with an existing settings file.
  Is there a different way I should be doing this?
  
  For context we have a large amount of Drupal Config saved in `config/sync` that we would like to import. As well as a bunch of CiviCRM config defined in code.
  
  **Tags:** drupal, installation
  
  > **Comments:**
  > **username_1**: i am probably misunderstanding, but having created 'clean' database, is there something preventing you then loading a backup of your existing db in to it? (using the skip triggers options eg https://civicrm.stackexchange.com/a/620/96  
  > **username_0**: Yeah, good question. The size of our production database is ~20GB and we're sharing this development environment with volunteers and contractors that we don't want to have access to our production data  
  > **username_1**: If you are needing eg Custom Fields in the db, and Custom Activity Types then you may need to look at https://github.com/CiviCooP/org.civicoop.configitems  
  
  ---
  
  ## 0 answers
  
  