Sanjeev
Sanjeev

Reputation: 1097

How to keep backup of our database in MySql

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

Upvotes: 0

Views: 681

Answers (2)

Marcelo Cantos
Marcelo Cantos

Reputation: 185842

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

Upvotes: 3

Pascal MARTIN
Pascal MARTIN

Reputation: 400932

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 :

Upvotes: 4

Related Questions