Is this safe? Is this OK to do in MYSQL?
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-05-03T08:38:30Z
Indexed on
2010/05/03
8:48 UTC
Read the original article
Hit count: 183
I have always done this:
mysqldump -hlocalhost -uuser -ppass MYDATABASE > /home/f/db_backup/MYDATABASE.sql
mysql -uuser -ppass MYDATABASE < MYDATABASE.sql
But, if I do this instead...is this safe? Is this identical to the above???
mysqldump -hlocalhost -uuser -ppass MYDATABASE | gzip > /home/f/db_backup/MYDATABASE.sql.gz
zcat MYDATABASE.sql.gz | mysql -uuser -ppass MYDATABASE
© Stack Overflow or respective owner