mysqldump 命令使用

备份所有数据库

mysqldump -uroot -p --all-databases > /Users/huyongjian/backup/mysql/all.db

备份指定数据库

mysqldump -uroot -p school_info > /Users/huyongjian/backup/mysql/school_info.db

备份指定数据库指定表

mysqldump -uroot -p school_info school class > /Users/huyongjian/backup/mysql/school_class.db

还原备份数据

use school_info
source /Users/huyongjian/backup/mysql/school_class.db
上一篇:MySQL基础命令


下一篇:ES5 深拷贝&浅拷贝