tags:

views:

27

answers:

2

I want to keep backup of my database and import it into different System? and how to make .dmp or store file in MySql?

+3  A: 

You can dump a database with the mysqldump command-line utility ; using a command like this :

mysqldump --user=USERNAME --password=PASSWORD --host=ORIGIN_HOST DATABASE_NAME > backup.sql


Then, as the backup is just a bunch of SQL instruction, importing it to another database is as easy as using the mysql command-line utility :

mysql --user=USERNAME --password=PASSWORD --host=DESTINATION_HOST NEW_DATABASE_NAME < backup.sql


And, as a couple of references to the relevant manual pages :

Pascal MARTIN
From the mysqldump file you can restore the backup using: mysql --username=USERNAME --password=PASSWORD --host=HOST < backup.sql
Mark_Carrington
+3  A: 

Read the manual. If there's something there that you're not sure about, ask a more specific question.

Marcelo Cantos