Backing up all mysql DB and restoring

Every time when I wanna Backup and Restore DB I have to google again and again. So here is very good tutorial for doing this saving time

http://www.webcheatsheet.com/SQL/mysql_backup_restore.php

In short:
1. backup all database compressed
mysqldump -u root -p --all-databases | gzip -9 > alldb_backup.sql.gz
2. restore all database + users
gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]

Comments

Popular posts from this blog

Set up RAID on Dell Poweredge 2850

How to implement Blueimp with Laravel 5

Excel disable auto increment in formula by row and column