$ mysqldump -u root -p[password] [dbname] > [backupfile.sql]
To dump all MySQL databases on the system, use the --all-databases shortcut
$ mysqldump -u root -p[password] --all-databases > [backupfile.sql]
To restore database
$ mysql -u root -p [password] [database_to_restore] < [backupfile]
No comments:
Post a Comment