mysql可以用这种方式<<! 输入内容 ! 做成脚本

以这种文件式做交接NB!!!!!

[root@NB test]# mysql -uroot -p$passwd <<!
> use mysql
> select user,host from user;
> !
Warning: Using a password on the command line interface can be insecure.
user    host
master    %
root    localhost
原文地址:https://www.cnblogs.com/bass6/p/6129295.html