I've installed Drupal (9) and CiviCRM (5.59) in separate databases using drush site:install and cv core:install in that order. The drupal database connection is set in settings.php, and the civi database connection is set in civicrm.settings.php.

It works, until it doesn't.

Amongst others (I think), on a Drupal core update, Civi believes it lives in the Drupal database and tries to run tests there. It doesn't have the right permissions (TRIGGERS and such), and everything fails. It also creates all civi tables in the drupal db (I think already on drush site:install, which it never uses during operation.

What is wrong ? How can I tell CiviCRM to always work in it's own database ?

1 Answer 1


Do you have civicrm_entity installed? See https://www.drupal.org/project/civicrm_entity/issues/3299224#comment-15013847

  • I have, and that would explain why these tables are created in the wrong database. I'm not sure if it explains why a drupal core update would try to use those tables ..
    – commonpike
    May 7, 2023 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.