Last active
March 6, 2020 16:22
-
-
Save divinity76/6a6bb779101e9f6c27e51eefb02f3ed9 to your computer and use it in GitHub Desktop.
mysqldump example
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
TODO: filter out the ??string?? stuff | |
??--order-by-primary?? | |
??--apply-slave-statements?? | |
??--default-character-set=utf8mb4?? | |
mysqldump --user=user_name --password --quick --insert-ignore --port=port_num --host=host_name --all-databases --no-autocommit --compress --add-locks --single-transaction --all-tablespaces --quote-names --allow-keywords --comments --complete-insert --create-options --dump-date --events --extended-insert --hex-blob --routines --set-charset | |
$cmd = implode(" ", array( | |
'mysqldump', | |
'--user=' . escapeshellarg($db_creds->dbuser), | |
'--password=' . escapeshellarg($db_creds->dbpass), | |
'--host=' . escapeshellarg($db_creds->dbhost), | |
// '--port=port_num', | |
'--quick', | |
'--insert-ignore', | |
'--all-databases', | |
'--no-autocommit', | |
'--compress', | |
'--add-locks', | |
'--single-transaction', | |
'--all-tablespaces', | |
'--quote-names', | |
'--allow-keywords', | |
'--comments', | |
'--complete-insert', | |
'--create-options', | |
'--dump-date', | |
'--events', | |
'--extended-insert', | |
'--hex-blob', | |
'--routines', | |
'--set-charset', | |
)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment