导出数据库
mysqldump eatfun_only -uroot -p123456 > eatfun_only.sql
mysqldump eatfun_new -ureadonly -h127.0.0.1 -preadonly > eatfun_new2.sql
mysqldump eatfun_new -ueatfun_new -h127.0.0.1 -p > eatfun_new2.sql
mysql -uroot -hlocalhost -p eatfun_new2 source < eatfun_new2.sql
导入数据库
mysqldump -uroot -p123456 eatfun_only < source eatfun_only.sql
或者
mysql> source eatfun_only.sql