mysql数据库的备份和还原

备份的数据库名称是metastore
$ mysqldump -uroot -p123456 metastore > /path/metastore.sql

mysql还原:
方式1: mysql -uroot -p metastore < /path/metastore.sql
方式2:mysql -uroot -p
mysql> source /path/metastore.sql

猜你喜欢

转载自blog.csdn.net/fengqilai112/article/details/81669349