MySQL Database – Backup and Restoration

MySQL Database – Backup and Restoration

Command to create the database backup.
mysqldump -u [database_user] -p [database_name] > dumpfilename.sql

Command to restore the database backup.
mysql -u [database_user] -p [database_name] < database.sql

(Use 'mysqldump --opt --all-databases > all_backup.sql' to backup everything.)
(Use the parameters '-h [IP address]' to access a database remotely.)

Click here for more info on mysqldump.

wizard has written 12 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>