以这种文件式做交接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
原文:http://www.cnblogs.com/bass6/p/6129295.html