Backup and Restore MySQL Complete

I had to backup and restore a MySQL database on a debian linux machine to another server at work. First I tried to do it trough phpmyadmin which is not very efficient when it comes to big db. So I decided to do it through the MySQL command prompt.

Backup all dbs command into a dump file
mysqldump -u root -p –all-databases > xxxxxxx.sql

Restore all dbs command from a dump file
mysql –f -u root -p < xxxxxxx.sql

Of course you need to replace x with the filename you would like to use.

As always… it worked for me but there is no warranty. You need to decide yourself if you want to use it!

admin on May 4th 2008 in MySQL

No Comments »

Trackback URI | Comments RSS

Leave a Reply

*




Check out new movies online website. Download and buy movies now.
1