Archive for January, 2009

Compressing mysqldump output – mysql, gzip, bzip2 and LZMA (7z)

Do a mysql dump and compress directly with gzip
mysqldump < mysqldump options> | gzip > outputfile.sql.gz

Gunzip and import using gzip
gunzip < outputfile.sql.gz | mysql < mysql options>

Do a mysql dump and compress directly with bzip2
mysqldump < mysqldump options> | bzip2 > outputfile.sql.bz2

Bunzip2 and import using bzip2
bunzip2 < outputfile.sql.bz2 | mysql < mysql options>

Do a mysql dump and compress directly with lzma
mysqldump < mysqldump options> | lzma > outputfile.sql.lzma

Unlzma and import using unlzma
unlzma < outputfile.sql.lzma | mysql < mysql options>

Related posts:

  1. Optimize MySQL for Low Memory Use
  2. Howto: How to Reset the MySQL Root Password
  3. Optimize MySQL Performance With MySQLTuner
  4. Sun acquires MySQL
  5. MySQL 5.0 Release Candidate
  6. MySQL Optimization and Performance Tips
  7. MDB Tools to export (migrate) from mdb (Microsoft Access format) to MySQL
  8. MySQL: Remove Duplicate Entries
  9. MySQL Concatenate: Adding String At The End Of Field Data
  10. MySQL Performance Monitoring and Optimization Tools

Comments (1)