To backup and restore a MySQL database

To backup a MySQL database:

mysqldump –-user username –password=password database_name > dumpfile.sql

To restore the database:

mysql -u username -ppassword database_name < dumpfile.sql

There is no space between the -p and password.

Further options are available, you can find out more at www.devshed.com.

2 Responses to “To backup and restore a MySQL database”

  1. August 30th, 2007 at 10:38 am

    [...] 2006 « To backup and restores a MySQL database Moblogging script SIMSI [...]

  2. September 16th, 2007 at 8:36 am

    Greet site

Leave a Reply