MySQL数据备份恢复

1.备份

mysqldump -u root -p密码 数据库名>XXX.txt/sql;

2.恢复

mysqladmin -u root -p密码 create 数据库名;
mysql -u root -p密码 数据库名<XXX.txt/sql;

发表评论