Monthly Archives: August 2010

How To Backup & Restore MySQL database using mysqldump

mysqldump tool provide facility to backup MySQL databases. It creates *.sql file with DROP, CREATE and INSERT statements. There are number of keys, which can be used to create backup of database(s).

Details of all keys can be checked using command
bash: # mysqldump --help

Basic command for taking backup

bash: # mysqldump -u root -p[root_password] [database_name] > filename.sql

And for restoring

bash: # mysql -u root -p[root_password] [database_name] < filename.sql

Continue reading