Ubuntu: MySQL Export/Import all databases in CLI

To Export all your MySQL databases, do this :
mysqldump -u yourusername -p -h localhost --all-databases | gzip > filename.sql.gz

To Import all your MySQL databases, do this :
mysql -u yourusername -p -h localhost < filename.sql

Also you might wonder how I unzipped the gz file. You can do this
gunzip filename.sql.gz


Popular posts from this blog

How to fix Cignal Top Box error - Please perform a smart card reset by removing your smart card for 15 seconds then reinsert the card. (1/2)

Magento: can't login to admin panel, can't add product to cart

Magento: How to fix "The requested URL /index.php was not found on this server" error