Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support installation of CiviCrm #1398

Closed
nigelwhite opened this issue Jan 24, 2019 · 3 comments
Closed

Support installation of CiviCrm #1398

nigelwhite opened this issue Jan 24, 2019 · 3 comments

Comments

@nigelwhite
Copy link

Is your feature request related to a problem? Please describe.
I could not install CiviCrm in a normal ddev Drupal 7. When running the CiviCrm installation script, via the browser, I get "Could not create a database trigger".

Describe the solution you'd like
CiviCrm requirements at https://docs.civicrm.org/sysadmin/en/latest/requirements/ includes mysql trigger support is required. It would be great if ddev provided this out of the box.

Describe alternatives you've considered
I tried MariaDB [db]> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE ON db.* TO 'db'@'localhost' IDENTIFIED BY 'db'; and I got the response Query OK, 0 rows affected (0.01 sec). This made no difference. Still got "Could not create a database trigger".

https://civicrm.stackexchange.com/questions/2770/database-trigger-error-message suggests another option, if you are using binary logging. I don't know if I am or not, so I didn't try that.

@rfay
Copy link
Member

rfay commented Jan 24, 2019

Please use the root user to do the grants and see how that goes. In either web or db container:

mysql -uroot -proot

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE ON db.* TO 'db'@'%' IDENTIFIED BY 'db';

You can do this in post-import-db or post-start hooks if you want to also.

@rfay
Copy link
Member

rfay commented Jan 24, 2019

Hmm, turns out this isn't about privileges but mysql configuration.

You can solve this problem in the sort term by creation .ddev/mysql/trigger.cnf with the contents

[mysqld]
log_bin_trust_function_creators=on

That got me through the D7 civicrm setup just fine. #1399 will add that by default.

@rfay rfay closed this as completed in 7d1d59d Jan 25, 2019
@nigelwhite
Copy link
Author

Perfect. Civi installed smoothly. Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants