Answers.Body: <p>"Access denied" is indicating an authentication problem somewhere, either because of a bad user name or password, or a   MySQL host restriction.</p>
  
  <p>Try testing the MySQL connection from the command line:</p>
  
  <pre><code>mysql -h hostname -u username -p database
  </code></pre>
  
  <p>You'll be prompted for the password. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-17T17:03:40.210Z
Answers.Text: Hey Dan,
  
  
  Thanks so much for the response!
  
  
  I failed to mention that I am able to connect (from local) to all remote databases on server using the command line..
  
  
  `mysql -h IP -D dbname -u USER -p`
  
  
  I also have gone into cPanel and made sure the IP of local is allowed (though I'm able to access db either way in local terminal).
  
  
  Right now I am trying to figure out if the civicrm database is hitting the server.  If I switch the settings to my local civicrm database, it works fine.
Answers.UserDisplayName: dras
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-17T19:16:23.083Z
Answers.Text: If you're getting 'insufficient permissions' I would presume you're hitting the server. You'd be getting a timeout otherwise.
Answers.UserDisplayName: Dan O'Brien
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-16T00:23:03.840Z
Answers.LastActivityDate: 2016-06-16T00:23:03.840Z
Answers.UserDisplayName: Dan O'Brien
Body: <p>I apologize if I am asking this in the wrong place, but I've hit something I cannot figure out..</p>
  
  <p>I have remote drupal and civicrm databases that I want to use for multiple developers.  My question concerns the civicrm.settings.php file.  I can successfully connect to the remote drupal (CMS) database using the settings.php config, but my civicrm settings do not seem to be pinging the server db at all.  This code (no matter which credentials/IP/DB I try) is not doing what I think it should be doing...</p>
  
  <p><code>define( 'CIVICRM_DSN'         , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
  </code></p>
  
  <p>The error:</p>
  
  <p>Initialization Error</p>
  
  <p>Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )</p>
  
  <pre><code>[code] =&gt; -26
  [message] =&gt; DB Error: insufficient permissions
  [mode] =&gt; 16
  [debug_info] =&gt;  [nativecode=1044 ** Access denied for user 'db_user'@'12.12.12.12' to database 'db']
  [type] =&gt; DB_Error
  [user_info] =&gt;  [nativecode=1044 ** Access denied for user 'db_user'@'12.12.12.12' to database 'db']
  [to_string] =&gt; [db_error: message="DB Error: insufficient permissions" code=-26 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=1044 ** Access denied for user 'db_user'@'12.12.12.12' to database 'db']"]
  </code></pre>
  
  <p>)</p>
  
  <p>The error duplicates, which I find puzzling.  Mainly, I am wondering if there is an example of somebody doing such a thing as remote setup with CiviCRM db.</p>
  
Tags: <drupal><database><mysql><civicrm.settings.php>
Title: Remote Database Connection
ThreadText: # Remote Database Connection
  
  (Asked by: username_0 on 2016-06-14)
  
  I apologize if I am asking this in the wrong place, but I've hit something I cannot figure out..
  I have remote drupal and civicrm databases that I want to use for multiple developers.  My question concerns the civicrm.settings.php file.  I can successfully connect to the remote drupal (CMS) database using the settings.php config, but my civicrm settings do not seem to be pinging the server db at all.  This code (no matter which credentials/IP/DB I try) is not doing what I think it should be doing...
  define( 'CIVICRM_DSN'         , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
  
  The error:
  Initialization Error
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )
  [code] => -26
  [message] => DB Error: insufficient permissions
  [mode] => 16
  [debug_info] =>  [nativecode=1044 ** Access denied for user 'db_user'@'12.12.12.12' to database 'db']
  [type] => DB_Error
  [user_info] =>  [nativecode=1044 ** Access denied for user 'db_user'@'12.12.12.12' to database 'db']
  [to_string] => [db_error: message="DB Error: insufficient permissions" code=-26 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=1044 ** Access denied for user 'db_user'@'12.12.12.12' to database 'db']"]
  
  )
  The error duplicates, which I find puzzling.  Mainly, I am wondering if there is an example of somebody doing such a thing as remote setup with CiviCRM db.
  
  **Tags:** drupal, database, mysql, civicrm.settings.php
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-16. Score: 1
  
  "Access denied" is indicating an authentication problem somewhere, either because of a bad user name or password, or a   MySQL host restriction.
  Try testing the MySQL connection from the command line:
  mysql -h hostname -u username -p database
  
  You'll be prompted for the password.
  
  > **Comments:**
  > **username_0**: Hey Dan,   Thanks so much for the response!   I failed to mention that I am able to connect (from local) to all remote databases on server using the command line..   `mysql -h IP -D dbname -u USER -p`   I also have gone into cPanel and made sure the IP of local is allowed (though I'm able to access db either way in local terminal).   Right now I am trying to figure out if the civicrm database is hitting the server.  If I switch the settings to my local civicrm database, it works fine.  
  > **username_1**: If you're getting 'insufficient permissions' I would presume you're hitting the server. You'd be getting a timeout otherwise.  
  
  ---
  
  