Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
So the solution for you, add the :$databases['default']['default']['prefix'] = array('default' => 'd7';'civicrm......);
$databases = array ( 'default' => array ( 'default' => array ( 'database' => 'ntrlst2_ntrls', 'username' => 'myuser', 'password' => 'mypass', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => 'd7', ), ),);$databases['default']['default']['prefix']= array( 'default' => 'd7', 'civicrm_acl' => '`ntrlst2_civi`.', 'civicrm_acl_cache' => '`ntrlst2_civi`.',... 'civicrm_website' => '`ntrlst2_civi`.', 'civicrm_worldregion' => '`ntrlst2_civi`.',);
If drupal and civicrm are in the same database, then you dont need to add anything to the db_prefix array..Hence the views integration settings does not show up for you
$databases = array ( 'default' => array ( 'default' => array ( 'database' => 'interpdrupalcivi2', 'username' => '**username**', 'password' => '**pasword**', 'host' => 'mysql.***.ca', 'port' => '', 'driver' => 'mysql', 'prefix' => 'drupal_', ), ),);
$databases['default']['default']['prefix']= array( 'civicrm_acl' => '`civicrm_`.', 'civicrm_acl_cache' => '`civicrm_`.',...
$databases['default']['default']['prefix']= array( 'civicrm_acl' => '`civicrm_`', 'civicrm_acl_cache' => '`civicrm_`', 'civicrm_acl_contact_cache' => '`civicrm_`', 'civicrm_acl_entity_role' => '`civicrm_`', 'civicrm_action_log' => '`civicrm_`', 'civicrm_action_mapping' => '`civicrm_`', 'civicrm_action_schedule' => '`civicrm_`', 'civicrm_activity' => '`civicrm_`', 'civicrm_activity_assignment' => '`civicrm_`', 'civicrm_activity_target' => '`civicrm_`', 'civicrm_address' => '`civicrm_`', 'civicrm_address_format' => '`civicrm_`', 'civicrm_batch' => '`civicrm_`', 'civicrm_cache' => '`civicrm_`', 'civicrm_campaign' => '`civicrm_`', 'civicrm_campaign_group' => '`civicrm_`', 'civicrm_case' => '`civicrm_`', 'civicrm_case_activity' => '`civicrm_`', 'civicrm_case_contact' => '`civicrm_`', 'civicrm_component' => '`civicrm_`', 'civicrm_contact' => '`civicrm_`', 'civicrm_contact_type' => '`civicrm_`', 'civicrm_contribution' => '`civicrm_`', 'civicrm_contribution_page' => '`civicrm_`', 'civicrm_contribution_product' => '`civicrm_`', 'civicrm_contribution_recur' => '`civicrm_`', 'civicrm_contribution_soft' => '`civicrm_`', 'civicrm_contribution_type' => '`civicrm_`', 'civicrm_contribution_widget' => '`civicrm_`', 'civicrm_country' => '`civicrm_`', 'civicrm_county' => '`civicrm_`', 'civicrm_currency' => '`civicrm_`', 'civicrm_custom_field' => '`civicrm_`', 'civicrm_custom_group' => '`civicrm_`', 'civicrm_dashboard' => '`civicrm_`', 'civicrm_dashboard_contact' => '`civicrm_`', 'civicrm_dedupe_exception' => '`civicrm_`', 'civicrm_dedupe_rule' => '`civicrm_`', 'civicrm_dedupe_rule_group' => '`civicrm_`', 'civicrm_discount' => '`civicrm_`', 'civicrm_domain' => '`civicrm_`', 'civicrm_email' => '`civicrm_`', 'civicrm_entity_batch' => '`civicrm_`', 'civicrm_entity_file' => '`civicrm_`', 'civicrm_entity_financial_trxn' => '`civicrm_`', 'civicrm_entity_tag' => '`civicrm_`', 'civicrm_event' => '`civicrm_`', 'civicrm_file' => '`civicrm_`', 'civicrm_financial_account' => '`civicrm_`', 'civicrm_financial_trxn' => '`civicrm_`', 'civicrm_grant' => '`civicrm_`', 'civicrm_group' => '`civicrm_`', 'civicrm_group_contact' => '`civicrm_`', 'civicrm_group_contact_cache' => '`civicrm_`', 'civicrm_group_nesting' => '`civicrm_`', 'civicrm_group_organization' => '`civicrm_`', 'civicrm_im' => '`civicrm_`', 'civicrm_line_item' => '`civicrm_`', 'civicrm_loc_block' => '`civicrm_`', 'civicrm_location_type' => '`civicrm_`', 'civicrm_log' => '`civicrm_`', 'civicrm_mail_settings' => '`civicrm_`', 'civicrm_mailing' => '`civicrm_`', 'civicrm_mailing_bounce_pattern' => '`civicrm_`', 'civicrm_mailing_bounce_type' => '`civicrm_`', 'civicrm_mailing_component' => '`civicrm_`', 'civicrm_mailing_event_bounce' => '`civicrm_`', 'civicrm_mailing_event_confirm' => '`civicrm_`', 'civicrm_mailing_event_delivered' => '`civicrm_`', 'civicrm_mailing_event_forward' => '`civicrm_`', 'civicrm_mailing_event_opened' => '`civicrm_`', 'civicrm_mailing_event_queue' => '`civicrm_`', 'civicrm_mailing_event_reply' => '`civicrm_`', 'civicrm_mailing_event_subscribe' => '`civicrm_`', 'civicrm_mailing_event_trackable_url_open' => '`civicrm_`', 'civicrm_mailing_event_unsubscribe' => '`civicrm_`', 'civicrm_mailing_group' => '`civicrm_`', 'civicrm_mailing_job' => '`civicrm_`', 'civicrm_mailing_recipients' => '`civicrm_`', 'civicrm_mailing_spool' => '`civicrm_`', 'civicrm_mailing_trackable_url' => '`civicrm_`', 'civicrm_mapping' => '`civicrm_`', 'civicrm_mapping_field' => '`civicrm_`', 'civicrm_membership' => '`civicrm_`', 'civicrm_membership_block' => '`civicrm_`', 'civicrm_membership_log' => '`civicrm_`', 'civicrm_membership_payment' => '`civicrm_`', 'civicrm_membership_status' => '`civicrm_`', 'civicrm_membership_type' => '`civicrm_`', 'civicrm_menu' => '`civicrm_`', 'civicrm_navigation' => '`civicrm_`', 'civicrm_note' => '`civicrm_`', 'civicrm_openid' => '`civicrm_`', 'civicrm_option_group' => '`civicrm_`', 'civicrm_option_value' => '`civicrm_`', 'civicrm_participant' => '`civicrm_`', 'civicrm_participant_payment' => '`civicrm_`', 'civicrm_participant_status_type' => '`civicrm_`', 'civicrm_payment_processor' => '`civicrm_`', 'civicrm_payment_processor_type' => '`civicrm_`', 'civicrm_pcp' => '`civicrm_`', 'civicrm_pcp_block' => '`civicrm_`', 'civicrm_persistent' => '`civicrm_`', 'civicrm_phone' => '`civicrm_`', 'civicrm_pledge' => '`civicrm_`', 'civicrm_pledge_block' => '`civicrm_`', 'civicrm_pledge_payment' => '`civicrm_`', 'civicrm_preferences' => '`civicrm_`', 'civicrm_preferences_date' => '`civicrm_`', 'civicrm_premiums' => '`civicrm_`', 'civicrm_premiums_product' => '`civicrm_`', 'civicrm_prevnext_cache' => '`civicrm_`', 'civicrm_price_field' => '`civicrm_`', 'civicrm_price_field_value' => '`civicrm_`', 'civicrm_price_set' => '`civicrm_`', 'civicrm_price_set_entity' => '`civicrm_`', 'civicrm_product' => '`civicrm_`', 'civicrm_project' => '`civicrm_`', 'civicrm_relationship' => '`civicrm_`', 'civicrm_relationship_type' => '`civicrm_`', 'civicrm_report_instance' => '`civicrm_`', 'civicrm_saved_search' => '`civicrm_`', 'civicrm_state_province' => '`civicrm_`', 'civicrm_subscription_history' => '`civicrm_`', 'civicrm_survey' => '`civicrm_`', 'civicrm_tag' => '`civicrm_`', 'civicrm_task' => '`civicrm_`', 'civicrm_task_status' => '`civicrm_`', 'civicrm_tell_friend' => '`civicrm_`', 'civicrm_timezone' => '`civicrm_`', 'civicrm_uf_field' => '`civicrm_`', 'civicrm_uf_group' => '`civicrm_`', 'civicrm_uf_join' => '`civicrm_`', 'civicrm_uf_match' => '`civicrm_`', 'civicrm_website' => '`civicrm_`', 'civicrm_worldregion' => '`civicrm_`',);
ErrorThe website encountered an unexpected error. Please try again later.Error messagePDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'interpdrupalcivi2.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 164 of /home/interp5/interpscan.ca/includes/lock.inc).Uncaught exception thrown in shutdown function.PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'interpdrupalcivi2.semaphore' doesn't exist: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 21061421754e780cbf1c8843.88200993 ) in lock_release_all() (line 266 of /home/interp5/interpscan.ca/includes/lock.inc).
$databases['default']['default']['prefix']= array( 'default' => 'drupal_', 'civicrm_acl' => '`civicrm_`', 'civicrm_acl_cache' => '`civicrm_`', 'civicrm_acl_contact_cache' => '`civicrm_`', 'civicrm_acl_entity_role' => '`civicrm_`', 'civicrm_action_log' => '`civicrm_`', 'civicrm_action_mapping' => '`civicrm_`', 'civicrm_action_schedule' => '`civicrm_`', 'civicrm_activity' => '`civicrm_`', 'civicrm_activity_assignment' => '`civicrm_`', 'civicrm_activity_target' => '`civicrm_`', 'civicrm_address' => '`civicrm_`', 'civicrm_address_format' => '`civicrm_`', 'civicrm_batch' => '`civicrm_`', 'civicrm_cache' => '`civicrm_`', 'civicrm_campaign' => '`civicrm_`', 'civicrm_campaign_group' => '`civicrm_`', 'civicrm_case' => '`civicrm_`', 'civicrm_case_activity' => '`civicrm_`', 'civicrm_case_contact' => '`civicrm_`', 'civicrm_component' => '`civicrm_`', 'civicrm_contact' => '`civicrm_`', 'civicrm_contact_type' => '`civicrm_`', 'civicrm_contribution' => '`civicrm_`', 'civicrm_contribution_page' => '`civicrm_`', 'civicrm_contribution_product' => '`civicrm_`', 'civicrm_contribution_recur' => '`civicrm_`', 'civicrm_contribution_soft' => '`civicrm_`', 'civicrm_contribution_type' => '`civicrm_`', 'civicrm_contribution_widget' => '`civicrm_`', 'civicrm_country' => '`civicrm_`', 'civicrm_county' => '`civicrm_`', 'civicrm_currency' => '`civicrm_`', 'civicrm_custom_field' => '`civicrm_`', 'civicrm_custom_group' => '`civicrm_`', 'civicrm_dashboard' => '`civicrm_`', 'civicrm_dashboard_contact' => '`civicrm_`', 'civicrm_dedupe_exception' => '`civicrm_`', 'civicrm_dedupe_rule' => '`civicrm_`', 'civicrm_dedupe_rule_group' => '`civicrm_`', 'civicrm_discount' => '`civicrm_`', 'civicrm_domain' => '`civicrm_`', 'civicrm_email' => '`civicrm_`', 'civicrm_entity_batch' => '`civicrm_`', 'civicrm_entity_file' => '`civicrm_`', 'civicrm_entity_financial_trxn' => '`civicrm_`', 'civicrm_entity_tag' => '`civicrm_`', 'civicrm_event' => '`civicrm_`', 'civicrm_file' => '`civicrm_`', 'civicrm_financial_account' => '`civicrm_`', 'civicrm_financial_trxn' => '`civicrm_`', 'civicrm_grant' => '`civicrm_`', 'civicrm_group' => '`civicrm_`', 'civicrm_group_contact' => '`civicrm_`', 'civicrm_group_contact_cache' => '`civicrm_`', 'civicrm_group_nesting' => '`civicrm_`', 'civicrm_group_organization' => '`civicrm_`', 'civicrm_im' => '`civicrm_`', 'civicrm_line_item' => '`civicrm_`', 'civicrm_loc_block' => '`civicrm_`', 'civicrm_location_type' => '`civicrm_`', 'civicrm_log' => '`civicrm_`', 'civicrm_mail_settings' => '`civicrm_`', 'civicrm_mailing' => '`civicrm_`', 'civicrm_mailing_bounce_pattern' => '`civicrm_`', 'civicrm_mailing_bounce_type' => '`civicrm_`', 'civicrm_mailing_component' => '`civicrm_`', 'civicrm_mailing_event_bounce' => '`civicrm_`', 'civicrm_mailing_event_confirm' => '`civicrm_`', 'civicrm_mailing_event_delivered' => '`civicrm_`', 'civicrm_mailing_event_forward' => '`civicrm_`', 'civicrm_mailing_event_opened' => '`civicrm_`', 'civicrm_mailing_event_queue' => '`civicrm_`', 'civicrm_mailing_event_reply' => '`civicrm_`', 'civicrm_mailing_event_subscribe' => '`civicrm_`', 'civicrm_mailing_event_trackable_url_open' => '`civicrm_`', 'civicrm_mailing_event_unsubscribe' => '`civicrm_`', 'civicrm_mailing_group' => '`civicrm_`', 'civicrm_mailing_job' => '`civicrm_`', 'civicrm_mailing_recipients' => '`civicrm_`', 'civicrm_mailing_spool' => '`civicrm_`', 'civicrm_mailing_trackable_url' => '`civicrm_`', 'civicrm_mapping' => '`civicrm_`', 'civicrm_mapping_field' => '`civicrm_`', 'civicrm_membership' => '`civicrm_`', 'civicrm_membership_block' => '`civicrm_`', 'civicrm_membership_log' => '`civicrm_`', 'civicrm_membership_payment' => '`civicrm_`', 'civicrm_membership_status' => '`civicrm_`', 'civicrm_membership_type' => '`civicrm_`', 'civicrm_menu' => '`civicrm_`', 'civicrm_navigation' => '`civicrm_`', 'civicrm_note' => '`civicrm_`', 'civicrm_openid' => '`civicrm_`', 'civicrm_option_group' => '`civicrm_`', 'civicrm_option_value' => '`civicrm_`', 'civicrm_participant' => '`civicrm_`', 'civicrm_participant_payment' => '`civicrm_`', 'civicrm_participant_status_type' => '`civicrm_`', 'civicrm_payment_processor' => '`civicrm_`', 'civicrm_payment_processor_type' => '`civicrm_`', 'civicrm_pcp' => '`civicrm_`', 'civicrm_pcp_block' => '`civicrm_`', 'civicrm_persistent' => '`civicrm_`', 'civicrm_phone' => '`civicrm_`', 'civicrm_pledge' => '`civicrm_`', 'civicrm_pledge_block' => '`civicrm_`', 'civicrm_pledge_payment' => '`civicrm_`', 'civicrm_preferences' => '`civicrm_`', 'civicrm_preferences_date' => '`civicrm_`', 'civicrm_premiums' => '`civicrm_`', 'civicrm_premiums_product' => '`civicrm_`', 'civicrm_prevnext_cache' => '`civicrm_`', 'civicrm_price_field' => '`civicrm_`', 'civicrm_price_field_value' => '`civicrm_`', 'civicrm_price_set' => '`civicrm_`', 'civicrm_price_set_entity' => '`civicrm_`', 'civicrm_product' => '`civicrm_`', 'civicrm_project' => '`civicrm_`', 'civicrm_relationship' => '`civicrm_`', 'civicrm_relationship_type' => '`civicrm_`', 'civicrm_report_instance' => '`civicrm_`', 'civicrm_saved_search' => '`civicrm_`', 'civicrm_state_province' => '`civicrm_`', 'civicrm_subscription_history' => '`civicrm_`', 'civicrm_survey' => '`civicrm_`', 'civicrm_tag' => '`civicrm_`', 'civicrm_task' => '`civicrm_`', 'civicrm_task_status' => '`civicrm_`', 'civicrm_tell_friend' => '`civicrm_`', 'civicrm_timezone' => '`civicrm_`', 'civicrm_uf_field' => '`civicrm_`', 'civicrm_uf_group' => '`civicrm_`', 'civicrm_uf_join' => '`civicrm_`', 'civicrm_uf_match' => '`civicrm_`', 'civicrm_website' => '`civicrm_`', 'civicrm_worldregion' => '`civicrm_`',);
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'civicrm_membership LEFT JOIN `civicrm_`civicrm_contact civicrm_contact ON civicr' at line 1
SELECT civicrm_contact.display_name AS civicrm_contact_display_name, civicrm_contact.id AS civicrm_contact_id, civicrm_membership.status_id AS civicrm_membership_status_idFROM {civicrm_membership} civicrm_membershipLEFT JOIN {civicrm_contact} civicrm_contact ON civicrm_membership.contact_id = civicrm_contact.idWHERE (( (civicrm_membership.status_id IN ('1', '2', '3')) ))
$databases['default']['default']['prefix']= array( 'default' => 'drupal_', 'civicrm_acl' => '', 'civicrm_acl_cache' => '', 'civicrm_acl_contact_cache' => '', 'civicrm_acl_entity_role' => '', 'civicrm_action_log' => '', 'civicrm_action_mapping' => '', 'civicrm_action_schedule' => '', 'civicrm_activity' => '', 'civicrm_activity_assignment' => '', 'civicrm_activity_target' => '', 'civicrm_address' => '', 'civicrm_address_format' => '', 'civicrm_batch' => '', 'civicrm_cache' => '', 'civicrm_campaign' => '', 'civicrm_campaign_group' => '', 'civicrm_case' => '', 'civicrm_case_activity' => '', 'civicrm_case_contact' => '', 'civicrm_component' => '', 'civicrm_contact' => '', 'civicrm_contact_type' => '', 'civicrm_contribution' => '', 'civicrm_contribution_page' => '', 'civicrm_contribution_product' => '', 'civicrm_contribution_recur' => '', 'civicrm_contribution_soft' => '', 'civicrm_contribution_type' => '', 'civicrm_contribution_widget' => '', 'civicrm_country' => '', 'civicrm_county' => '', 'civicrm_currency' => '', 'civicrm_custom_field' => '', 'civicrm_custom_group' => '', 'civicrm_dashboard' => '', 'civicrm_dashboard_contact' => '', 'civicrm_dedupe_exception' => '', 'civicrm_dedupe_rule' => '', 'civicrm_dedupe_rule_group' => '', 'civicrm_discount' => '', 'civicrm_domain' => '', 'civicrm_email' => '', 'civicrm_entity_batch' => '', 'civicrm_entity_file' => '', 'civicrm_entity_financial_trxn' => '', 'civicrm_entity_tag' => '', 'civicrm_event' => '', 'civicrm_file' => '', 'civicrm_financial_account' => '', 'civicrm_financial_trxn' => '', 'civicrm_grant' => '', 'civicrm_group' => '', 'civicrm_group_contact' => '', 'civicrm_group_contact_cache' => '', 'civicrm_group_nesting' => '', 'civicrm_group_organization' => '', 'civicrm_im' => '', 'civicrm_line_item' => '', 'civicrm_loc_block' => '', 'civicrm_location_type' => '', 'civicrm_log' => '', 'civicrm_mail_settings' => '', 'civicrm_mailing' => '', 'civicrm_mailing_bounce_pattern' => '', 'civicrm_mailing_bounce_type' => '', 'civicrm_mailing_component' => '', 'civicrm_mailing_event_bounce' => '', 'civicrm_mailing_event_confirm' => '', 'civicrm_mailing_event_delivered' => '', 'civicrm_mailing_event_forward' => '', 'civicrm_mailing_event_opened' => '', 'civicrm_mailing_event_queue' => '', 'civicrm_mailing_event_reply' => '', 'civicrm_mailing_event_subscribe' => '', 'civicrm_mailing_event_trackable_url_open' => '', 'civicrm_mailing_event_unsubscribe' => '', 'civicrm_mailing_group' => '', 'civicrm_mailing_job' => '', 'civicrm_mailing_recipients' => '', 'civicrm_mailing_spool' => '', 'civicrm_mailing_trackable_url' => '', 'civicrm_mapping' => '', 'civicrm_mapping_field' => '', 'civicrm_membership' => '', 'civicrm_membership_block' => '', 'civicrm_membership_log' => '', 'civicrm_membership_payment' => '', 'civicrm_membership_status' => '', 'civicrm_membership_type' => '', 'civicrm_menu' => '', 'civicrm_navigation' => '', 'civicrm_note' => '', 'civicrm_openid' => '', 'civicrm_option_group' => '', 'civicrm_option_value' => '', 'civicrm_participant' => '', 'civicrm_participant_payment' => '', 'civicrm_participant_status_type' => '', 'civicrm_payment_processor' => '', 'civicrm_payment_processor_type' => '', 'civicrm_pcp' => '', 'civicrm_pcp_block' => '', 'civicrm_persistent' => '', 'civicrm_phone' => '', 'civicrm_pledge' => '', 'civicrm_pledge_block' => '', 'civicrm_pledge_payment' => '', 'civicrm_preferences' => '', 'civicrm_preferences_date' => '', 'civicrm_premiums' => '', 'civicrm_premiums_product' => '', 'civicrm_prevnext_cache' => '', 'civicrm_price_field' => '', 'civicrm_price_field_value' => '', 'civicrm_price_set' => '', 'civicrm_price_set_entity' => '', 'civicrm_product' => '', 'civicrm_project' => '', 'civicrm_relationship' => '', 'civicrm_relationship_type' => '', 'civicrm_report_instance' => '', 'civicrm_saved_search' => '', 'civicrm_state_province' => '', 'civicrm_subscription_history' => '', 'civicrm_survey' => '', 'civicrm_tag' => '', 'civicrm_task' => '', 'civicrm_task_status' => '', 'civicrm_tell_friend' => '', 'civicrm_timezone' => '', 'civicrm_uf_field' => '', 'civicrm_uf_group' => '', 'civicrm_uf_join' => '', 'civicrm_uf_match' => '', 'civicrm_website' => '', 'civicrm_worldregion' => '',);
'default' => 'my_drupal_database_prefix',
$databases['default']['default'] = array('driver' => 'mysql', 'database' => 'drupal', 'username' => 'drupal_user', 'password' => 'drupal_password', 'host' => 'localhost', 'port' => 3306, 'prefix' => 'drupal_', 'collation' => 'utf8_general_ci',);$databases['default']['default']['prefix']= array( 'default' => 'drupal_', 'civicrm_acl' => '`civicrm`.', 'civicrm_acl_cache' => '`civicrm`.', .... );