水管和三通破损?
此回显的输出不会使用管道传递到下一个命令。
echo 'set foreign_key_checks = 0; truncate table saurabh.bus_services;' |
mysqldump --compact --no-create-info -h192.168.950.180 -uroot -p live pnlbus |
more
我想要 set 和 truncate 命令,然后是转储输出。
The output of this echo is not passed on to the next command using pipe.
echo 'set foreign_key_checks = 0; truncate table saurabh.bus_services;' |
mysqldump --compact --no-create-info -h192.168.950.180 -uroot -p live pnlbus |
more
I want the set and truncate commands followed by the dump output.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
现在您正在发送
setforeign_key_checks = 0; truncate table saurabh.bus_services;
到mysqldump
命令。我想这不是你想要做的。尝试类似的东西
Right now you are sending
set foreign_key_checks = 0; truncate table saurabh.bus_services;
to themysqldump
command. I guess this is not what you mean to do.Try something like
“mysqldump”命令是否执行任意 SQL 并转储数据?
我怀疑不是,在这种情况下,您需要将“set”和“truncate”命令回显到“mysql”而不是 mysqldump。
Does the 'mysqldump' command execute arbitrary SQL as well as dump the data?
I suspect not, in which case, you need to echo the the 'set' and 'truncate' commands to 'mysql' rather than mysqldump.