Last active
October 10, 2018 07:35
-
-
Save radub/7f60a9c4848cbee14131c67fd47bd38b to your computer and use it in GitHub Desktop.
This file contains 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
# enable logging to file | |
SET GLOBAL log_output = "FILE"; | |
SET GLOBAL general_log_file = "/tmp/q_logfile.log"; | |
SET GLOBAL general_log = 'ON'; | |
# dump database | |
mysqldump --routines --single-transaction -q --add-drop-table --create-options --add-drop-database --disable-keys --extended-insert --set-charset {database_name} | gzip > {database_name}.sql.gz | |
# remove definer | |
perl -p -i.bak -e "s/DEFINER=[^ |\s]*//g" dbdumpfile.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment