MySQL server – Import or Export gzip archive on the fly

Export :

mysqldump -u user -p database | gzip > database.sql.gz

Import :

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