Sunday, September 4, 2011

Backing up and restoring mysql databases

Sponsored Links
Tacking the back up of a database
mysqldump  -u username -ppassword  database_name > database_name.sql
For example
mysqldump  -u root -pabc123 horde > horde.sql

Restoring the database
mysql database_name < database_name.sql
For example
mysql horde < horde.sql

Restart the mysql
/etc/init.d/mysqld restart
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.