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

 

posted @ 2016-12-03 18:24  bass  阅读(269)  评论(0编辑  收藏  举报