0

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.

1 Answer 1

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.

2
  • 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.
    – dras
    Jun 17, 2016 at 17:03
  • If you're getting 'insufficient permissions' I would presume you're hitting the server. You'd be getting a timeout otherwise. Jun 17, 2016 at 19:16

Your Answer

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

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