There are two possible failures.

l10n and logging both add MySQL triggers to the database.

aegir, when migrating a database, imports the database with the user permissions of the non-privileged user that owns the database (as one would reasonably expect it to). However, in MySQL land, adding a trigger to a database requires super privileges over the entire database server. That means that when aegir tries to import that database, it fails.

I've worked around it with a gross hack that provides the new database user super priviliges, but this hardly seems like a good solution. I think we may need to simply import the database as the aegir/root database user.

The second failure is that the triggers define what database user has permission to call them and this info is hard-coded in the database dump file. MySQL will happily import this dump. However, if, on the target server, the database user name changes (as was my case after a few failed migration attempts resulting in dbuser_2 being my user instead of just dbuser), then the first call to a civicrm function (in this case, civicrm-update-cfg in provision.verify.inc) fails.

Again - not sure the best way to fix it - perhaps a sed statement against the database dump before importing?

jamie

Comments

bgm’s picture

Status: Active » Postponed (maintainer needs more info)

Newer versions of provision have this "sed" in the mysqldump statement in order to filter them out. It was committed to provision around June, c.f.: #881496: Problem migrating sites with mysql views.

Can you test and confirm?

Thanks,
Mathieu

bgm’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing this, since no activity in a long time, and should be working. Please re-open if necessary.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.