Affichage des articles dont le libellé est DATABASE. Afficher tous les articles
Affichage des articles dont le libellé est DATABASE. Afficher tous les articles

samedi 15 juin 2013

Backup and Restore MySQL Database Using mysqldump


mysqldump is an effective tool to backup MySQL database. It creates a *.sql file with DROP table, CREATE table and INSERT into sql-statements of the source database. To restore the database,  execute the *.sql file on destination database.


1:  backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql  
2:  restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql