Is it possible? Used the different database on remote server for civicrm logging. Means: Currently i am using two databases one for drupal and second is using for Civicrm. Both are on different remote server. Now i want to create a third server for civicrm logging database. It is showing error "DB Error: no such database". I already configured in civicrm.settings.php file. define('CIVICRM_LOGGING_DSN',mysql://myserverdetail);
2 Answers
Parvez is right that you can use a different DATABASE but if you mean a different HOST then the answer is no. The triggers that are used don't support that.
-
1Yeah I was thinking about that but as you pointed out if the triggers themselves don't allow a different host but there are workarounds to this at the MariaDB/MySQL layer if you really wanted to do it. It would need a patch to the code that generates the logging tables - something along these lines stackoverflow.com/questions/26503342/… Commented Sep 17, 2020 at 14:34
-
Yes perfectly possible, we do it all the time. You can set the logging DSN in your settings file (CIVICRM_LOGGING_DSN) if its not set then CiviCRM falls back to the CIVICRM_DSN
Sorry - just read your whole question!
I would check that the user has permissions from the CIVICRM_DSN to the CIVICRM_LOGGING_DSN i.e. if the CiviCRM database user cannot access the logging database then maybe thats causing the issue.