Last active
August 29, 2015 13:57
-
-
Save martijngastkemper/9391764 to your computer and use it in GitHub Desktop.
Dump MySQL database and remove definer. Definer must be an existing user. So when moving a database to another server the trigger can fail when the definer doesn't exists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump database-name | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' > output.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment