tags:

views:

22

answers:

2

The best I mean the smallest file size.

A: 

gzipped SQL is probably about the best you're going to get. You could copy the actual data files themselves, but then you run the risk of copying a partially modified table, resulting in a broken copy.

mysqldump -h host -u username --password=foo dbname > file.sql

gzip file.sql
Harold1983-
A: 
mysqldump -h host -u username --password=foo dbname | gzip -9 > file.sql.gz
Vadim