开发者

Which format is the best for mysql data export?

The best I mean the smallest开发者_如何转开发 file size.


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


mysqldump -h host -u username --password=foo dbname | gzip -9 > file.sql.gz
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜