复制数据库的Shell命令

mysqldump -h$host db_old -uroot -p$pass | mysql -h$host db_new -uroot -p$pass

管道符号,是unix一个很强大的功能,符号为一条竖线:"|"。
用法: command 1 | command 2 他的功能是把第一个命令command 1执行的结果作为command 2的输入传给command 

原文地址:https://www.cnblogs.com/leodaxin/p/10407890.html