Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.71 KB

mysql.md

File metadata and controls

43 lines (33 loc) · 1.71 KB

MySql

Flags to provide password in file
--defaults-file=user_pass.cnf
--login-path

Exports

# If you have a larger db you gotta use --max_allowed_packet
mysqldump --max_allowed_packet=500M --single-transaction --events --databases dbname > backup-dbname-$(date +%Y-%m-%d_%H-%M).sql

# Export all databases
mysqldump --all-databases > backup-all-$(date +%Y-%m-%d_%H-%M).sql

# Export database schema with triggers & routines
mysqldump --no-data --routines --triggers > schema.sql

mydumper

Faster, parallelized database dumps for mysql.

XtraBackup

"Enterprisey" level backup tool for mysql.

Links