Answers.Body: <p>From the manual:
  1. If you have different database users for your CiviCRM and Drupal databases, then you need to grant SELECT access for the Drupal user to all the CiviCRM tables.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-02T13:54:20.497Z
Answers.LastActivityDate: 2020-02-02T13:54:20.497Z
Answers.UserDisplayName: Webmaster COVS
Body: <p>I am trying to set up Views on my CiviCRM 4.7.10 (Drupal 7.42). My Drupal database is on one SQL server. And my CiviCRM database is on another SQL server.
  Whenever I try to create a new view, I encounter the following message: 
  SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'xxxxx'@'xxxxxx' for table 'civicrm_contact'
  After looking intensively through the documentation, I cannot manage to find the right changes so that Views can connect to the correct SQL server. 
  I have tried changing the file settings.php, but with no success.
  Could someone kindly tell me what to do so that Views connects correctly to the SQL server where the CiviCRM is?
  Thanks a lot.</p>
  
Tags: <database><drupal-views><webserver>
Title: Using Views with two sql servers
ThreadText: # Using Views with two sql servers
  
  (Asked by: username_0 on 2016-10-07)
  
  I am trying to set up Views on my CiviCRM 4.7.10 (Drupal 7.42). My Drupal database is on one SQL server. And my CiviCRM database is on another SQL server.
  Whenever I try to create a new view, I encounter the following message:
  SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'xxxxx'@'xxxxxx' for table 'civicrm\_contact'
  After looking intensively through the documentation, I cannot manage to find the right changes so that Views can connect to the correct SQL server.
  I have tried changing the file settings.php, but with no success.
  Could someone kindly tell me what to do so that Views connects correctly to the SQL server where the CiviCRM is?
  Thanks a lot.
  
  **Tags:** database, drupal-views, webserver
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-02. Score: 0 | Accepted answer
  
  From the manual:
  1. If you have different database users for your CiviCRM and Drupal databases, then you need to grant SELECT access for the Drupal user to all the CiviCRM tables.
  
  
  ---
  
  