Ubuntu: MySQL Export/Import all databases in CLI
To Export all your MySQL databases, do this :
To Import all your MySQL databases, do this :
Also you might wonder how I unzipped the gz file. You can 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
Comments
Post a Comment