备份所有数据库
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