Created
March 20, 2018 19:28
-
-
Save grimzy/ac4f33589e304f4c293aee76fc9c58d2 to your computer and use it in GitHub Desktop.
Portable MySQL dump
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 > database_dump.sql | |
sed -E 's/DEFINER=`[^`]+`@`[^`]+`/DEFINER=CURRENT_USER/g' database_dump.sql > portable_database_dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For when we try to import a MySQL dump and get the following error:
The user specified as a definer ('srv_master'@'localhost') does not exist