Closed (fixed)
Project:
Provision
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2015 at 02:13 UTC
Updated:
21 May 2015 at 20:14 UTC
Jump to comment: Most recent
Database import failed: ERROR 1227 (42000) at line 40426: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
I can't migrate a site. I get the above error.
Comments
Comment #1
helmo commentedAnything special in that database? Views? triggers? Functions?
Comment #2
ergonlogicIt's very possible that the refactoring of how we filter out unwanted SQL statements in #1324466: provision-migrate fails because provision-backup creates a useless dump needs further work. The relevant regexes now live in
Provision_Service_db_mysql::get_regexes(), and can be extended or altered by implementinghook_provision_mysql_regex_alter(&$regexes). I suspect the regexes simply need some work, as per this comment.Comment #3
socialnicheguru commentedhow would i check if there is something special in this particular database?
Comment #4
socialnicheguru commentedComment #5
socialnicheguru commentedin the dbase, there is a view section for mutual_credit
View
mcapi_index
Comment #6
omega8cc commentedThis affects CiviCRM sites as well:
Database import failed: ERROR 1227 (42000) at line 1283: Access denied; you need (at least one of) the SUPER privilege(s) for this operationComment #8
ergonlogicThe regex anchors were misplaced. Re-open this issue if this bug persists for you on commit 880a57e, or later.
Comment #9
omega8cc commentedThe patch didn't fix the problem for CiviCRM sites.
Comment #10
ergonlogicPerhaps we shouldn't be anchoring these regexes at all... Can you post the relevant line of the dump? This'll make replicating this issue much easier.
For CiviCRM specifically, it seems like implementing
hook_provision_mysql_regex_alter()inprovision_civicrmwould be the way to go.Comment #11
omega8cc commentedIt worked just fine before this refactoring so it should work without the need for any extra hooks. I don't have relevant lines, just a failed task logs on sites working perfectly before this change/refactoring. It should be easy to reproduce on any CiviCRM site, I suppose, because we have received many reports from many users actively working with CiviCRM sites.
Comment #12
anarcat commentedi believe we may have too many escapes, like mentionned in #1324466: provision-migrate fails because provision-backup creates a useless dump.
Comment #13
anarcat commentedso the attempt with anchors was to avoid corrupting nodes (e.g. this one!!!) that would have snippets of database dumps in them. without the anchors, we could be messing with that data, which is really bad!
but since it broke other stuff, let's remove the anchors and split that in another issue. here's the patch that i pulled out of my ass while i was workign on this, incomplete:
Comment #15
ergonlogicI've removed the anchors and double-escaping, which should get us back to a working solution here. Please confirm, for those of you seeing this. If it's still an issue, please post the relevant line from the db dump, to make testing easier.
I'm going to close this issue and open a new one to address the possibility of removing lines we wouldn't want in body fields, etc.
Comment #16
ergonlogicfollow-up issue: #2485017: SQL filtering (slightly) too agressive
Comment #17
ar-jan commentedFrom my earlier testing with plain sed, just removing the double-escaped backslashes should be sufficient, the anchors weren't a problem.Comment #18
ar-jan commentedActually, strike that, while I did not touch any anchors, that's because they weren't there in the script I tested (https://github.com/omega8cc/boa/pull/672).
Comment #19
omega8cc commentedIndeed, 764fcb8 fixed the problem for CiviCRM sites. Thanks!