Closed (fixed)
Project:
Barracuda
Component:
Database Server
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2012 at 19:18 UTC
Updated:
2 Mar 2013 at 03:10 UTC
As of 4.2, Civi has introduced a number of database triggers. This version now requires that either:
Just wanted to share the information as BOA has binary logging on by default, and Migrating a site always creates a new SQL user (meaning if you issued SUPER privilege previously, your site will break until you give the privilege to the new user post-migration).
Comments
Comment #1
omega8cc commentedNot sure how to reproduce the problem? We have tested cloning and migrating CiviCRM 4.2.4 D7 sites and there were no issues.
Comment #2
narayanis commentedI am still using 4.2.2, so perhaps some other items have changed on the CiviCRM side in the 4.2.4 released. Upon migrating, the Civi error logs displayed the error "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)". Making the new user SUPER eliminated the error.
Comment #3
omega8cc commentedHmm, while cloning works fine, migration 4.2.4 -> 4.2.4 fails (but with probably unrelated errors) and also 4.2.2 to 4.2.4 fails (but I'm not sure if it worked before for older versions).
The errors we see are:
There are no other errors and we didn't experience any "You do not have the SUPER privilege and binary logging is enabled" error while testing CiviCRM 3.4.8 D6, CiviCRM 4.1.6 D6, CiviCRM 4.2.2 D7 and CiviCRM 4.2.4 D7.
Do you use the platforms which come with Octopus?
Comment #4
narayanis commentedNo, I am using a custom platform but following all best practices from the omega8cc website. The old one was D 7.14 with Civi 4.2.2, and the new one is D 7.16 with Civi 4.2.2. I also received this error upon original upgrade from 4.1.x to 4.2, and found several threads on the Civi forum that mention this error and new requirement.
I am not sure if this is related, but due to frequent errors when validating/cloning/migrating sites in the past, I was advised to move provision_civicrm out of the /data/disk/USER/.drush folder prior to moving sites.
Comment #5
omega8cc commentedI can't reproduce the original problem, so I'm moving this to the provision_civicrm queue.
Feel free to move it back if there is any way to reproduce the problem using platforms installed by Octopus.
It is also possible that it would require some content created, so testing on vanilla sites with just enabled CiviCRM will not reveal it.
Comment #6
pauleb commentedI can confirm that there seems to be an issue with Provision CiviCRM. I get the error described in #3 while just having civicrm and memcache enabled.
While trying to migrate from 7.15 with 4.2.1 to 7.15 with 4.2.2 the problems began. Today I tried again and were not able to do the upgrade with aegir and provision_civicrm.
None the less the manual upgrade, first of civicrm from 4.2.1 to 4.2.6 and later of Drupal 7.15 to 7.17 worked without any issues. So since manual upgrades work it's not a critical issue for me, but it still breaks the work flow and is just a little bit too inconvenient.
But still migrating and cloning from a platform with 7.17 + 4.2.6 to another platform with 7.17 + 4.2.6 gives me the same error. Verifying works.
I'm not sure if this is the right issue or if that is not connected to the SQL issues. But since I can reproduce the error maybe I can help solving it or test patches or workarounds.
Comment #7
bgm commentedAre we talking about the initial bug report, or the one about the ClassLoader in #3?
I'm also getting the ClassLoader issue.
About "Super" privileges: yes, if you have a multi-lingual site, or database logging of changelogs, CiviCRM uses triggers. If you have binary logging / replication, mysql requires SUPER, since it runs the trigger from the log as root (ex: on the secondary mysql server).
Comment #8
pauleb commentedI was talking about the ClassLoader error. I posted here because I found exact the same error message I got in the comments, but it seems I should have opened a separte issue.
Since, as I described above, the manual upgrades work I don't think that there are any problems with my database settings / configuration. On the other hand I'm neither a database specialist nor a programmer and I thought maybe these two are somehow related in a way that I don't get.
Comment #9
sluc23 commentedHi,
Any update on civicrm clone/migration issue?
I'm still getting an error cloning/migrating via AEgir a web site from platform D7.14 + Civi 4.2.2 to D7.18 + Civi 4.2.6
Drush command terminated abnormally due to an unrecoverable error. Error: Cannot redeclare class CRM_Core_ClassLoader in
/. . . /sites/all/modules/civicrm/CRM/Core/ClassLoader.php, line 36
Thanks in advance!
Comment #10
Poieo commentedI opened #1907884: Migrations Fail - Error: Cannot redeclare class CRM_Core_ClassLoader to deal with the ClassLoader error. Please continue that discussion there.
Comment #11
bgm commentedClassLoader issue is now fixed: #1907884: Migrations Fail - Error: Cannot redeclare class CRM_Core_ClassLoader
Regarding the SUPER privileges, I'd say it's hosting-specific. I'm not very familiar with BOA, but if it enables binary logging by default, it's a BOA-specific issue. On a mysql server without binary logging, you only need the "trigger" privilege, and it works fine.
Note that if you give "super" privileges to your mysql users, this means they can read/write on any database.
Also, the reason why mysql requires super privs for replication, is that the binary logs are run as the root user, so an attacker could use triggers to read/write in another database.
Comment #12
omega8cc commentedOK, so we have only BOA-specific issue left here now and the other issue fixed in another thread, I'm moving it back to the Barracuda queue, to avoid further duplicates like: #1918296: CiviCRM Extensions fail on install - MariaDB config
Comment #13
omega8cc commentedBinary logging is now optional and defaults to
NO: http://drupalcode.org/project/barracuda.git/commit/dd43ec6 - this should fix the problem, AFAIK.