0

When trying to install CiviCrm in Drupal 7 I get "Could not create a database trigger".

Using a standard ddev config.yml for drupal7.

A couple of solutions are suggested at https://civicrm.stackexchange.com/questions/2770/database-trigger-error-message but I am struggling to implement them within ddev. RE Grant - When I try ddev exec mysql GRANT..... I get failed to execute command. When I ssh into a mysql shell to try to grant privileges I get access denied for user. RE log_bin_trust_function_creators = 1. Where would I insert that?

nigelwhite
  • 15
  • 7

1 Answers1

0

Update 2019-01-25: I went to check this out after you created the issue and what I suggested was inadequate. As explained there, you need to do a little custom config. Create a .ddev/mysql/trigger.cnf with these contents:

[mysqld]
log_bin_trust_function_creators=on

And the next release of ddev (mid-February) will make this the default (PR). So please report your results there. I was able to install CiviCRM with this mysql config.

Original response: True but not adequate for triggers: The db container root user has full privileges, so you can use mysql -uroot -proot ... to do what you need to do. You can do that inside the db container ddev ssh -s db or inside the web container ddev ssh or from the host using the info in ddev describe (but using root/root). (You can also use the root user to grant additional privileges to the db user, of course.)

If you know what privileges are required, we should add them to the db user, so please make an issue requesting what you need, because we'd like this to be easier for you.

rfay
  • 9,963
  • 1
  • 47
  • 89
  • Thanks, I updated here with the same answer as the issue. Sorry to have given an inadquate answer the first time. I did try with log_bin_trust_function_creators=on and was able to install CiviCRM. – rfay Jan 25 '19 at 14:36
  • Also, this was fixed in ddev v1.6.0, so the extra log_bin_trust_function_creators is no longer necessary. – rfay May 14 '19 at 22:00