Friday, 28 September 2012

Ubuntu: MySQL import/export with gunzip

To export your mysql database simply do the following :

mysqldump -u user -p database | gzip > database.sql.gz
 
And to import it :

gunzip < database.sql.gz | mysql -u user -p database

No comments:

Post a Comment