Friday, March 20, 2009

Back up im mysql- using mysqldump

hi, this is regarding a very useful; command in mysql by which u can backup your databases and transfer it to another server (which may or may not be mysql) .

to backup go in command promt or shell and type:
mysqldump -u username -p name of database to be backed up > name of backup file
password : *******

after this a backup file having .sql xtension will b created .
now to restore the database (first u must copy the .sql file to the computer u want to restote in) go to command prompt of the other computer and write:

mysql -u username -p
$password : ********

this will create the backup database and you are done~~~~~ :)

No comments:

Post a Comment