Restore MySQL database from dump file

Restore MySQL database from dump file

In a previous post I described how you can backup your MySQL database(s). This article tells you how to restore a database using the dump file created by the backup command.

Just start a command box and execute the following command, enter the password for the given user and wait for the command to complete.

[text]
mysql -u username -p database < dumpfile.sql
[/text]

Substitute ‘username’, ‘database’ and ‘dumpfile.sql’ with your own data.

Look at the MySQL reference manual for all the possible options for the mysql command.

Leave a Reply

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