MySQL数据库备份及恢复命令及常用应用举例

备份
mysqldump –force –quick –skip-opt –create-options –add-drop-table –extended-insert –host=”localhost” –user=”root” –password=”密码” “数据库名称” > C:/2010-01-26.sql

– 还原

mysql –host=”localhost” –user=”root” –password=”密码” “数据库名称” < C:/2010-01-26.sql

本文总结了MySQL数据库备份及恢复常用命令mysqldump,source的用法。
还原一个数据库:mysql -h localhost -u root -p123456 www

备份一个数据库:mysqldump -h localhost -u root -p123456 www > d:\www2008-2-26.sql Continue reading