Trying to install to WordPress and I get; "Could not create a database trigger." I have no idea how to resolve. Thank you!
3 Answers
The problem is that the database user doesn't have some higher level privileges required for CiviCRM. Ask your ISP support or database administrator to run the following commands for you as the root MySQL user:
-- Assuming a database called "civicrm" and a user called "civicrm_user" -- and a MySQL version of 5.1.6+
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER, CREATE ROUTINE, ALTER ROUTINE ON civicrm.* TO 'civicrm_user'@'localhost' IDENTIFIED BY 'realpasswordhere';
For more details see: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+MySQL+Permission+Requirements
-
If you use a server cluster that does replication of the mySQL database you may also need the 'super' privilege.– RocXaMay 28, 2015 at 9:24
-
Agreed, though I suspect @f1mktsol is not at that level of sophistication.– Joe Murray ♦May 29, 2015 at 0:12
-
1In case it's useful, being configured to act as a master/using a binary logging caused this problem for me. Simply disabling the master/binary logging settings (which I didn't actually need) fixed it for me. Note - it was particularly misleading error as the database user had triggers setting enabled.– fred2Dec 19, 2016 at 20:08
If you're using binary logging, you may need to add a line to your MySQL or MariaDB configuration (/etc/mysql/my.cnf) to proceed with the installation.
log_bin_trust_function_creators = 1
-
This didn't work when added to my my.cnf file but, but did work when I ran this: set @@global.log_bin_trust_function_creators = 1; It allowed me to install CiviCRM on WordPress but I assume I'll still need to make that a permanent change in the conf file. Mar 5, 2020 at 23:58
you should provide super privilege to the user
GRANT SUPER ON *.* TO 'user'@'%';
for more information