Archive for the ‘mysql’ Category

To backup and restore a MySQL database

Tuesday, August 28th, 2007

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.