MysqlDump can be used for many different reasons. For one, you can use
mysqldump to backup the data in your MySql DataBase. Here is what
MYSQLDUMP – takes all the information in the selected database or table and dumps it into a text file. After the information is in a text file you can dump it into any database you want.
let’s take all the tables and information in the tables from the database mydb and dump it into a text file.
mysqldump -uroot -ppassword -hhost (if needed) mydb > txtfile.dump
That command will take all the information in the database mydb and dump it into txtfile.dump
Ok, so now let’s say you formatted your box and you want to re-enter that information in the database.
First, you need to create mydbe again, then you need to type the following command.
This command will dump the contents of txtfile.dump into your database and you will be ready to go.
mysql -uroot -ppassword mydb < txtfile.dump
Now check your db and all the same tables and information in the tables will be back in the mydb database.