tmp
[root@hadoop1 bash_app]# cat sta_addr.hadoop.test.sh HOST=192.168.7.210 PORT=3306 USER=root #PASS=abc&2016 DB=xl_test TAB=ad_web_report QUERY=`mysqldump -h$HOST -P$PORT -u$USER -pabc\&2016 $DB $TAB > mytest.sql; exit EOF` echo $QUERY
[root@hadoop1 bash_app]# cat sta_addr.hadoop.test.sh HOST=192.168.7.210 PORT=3306 USER=root #PASS=abc&2016 DB=xl_test TAB=ad_web_report mysqldump -h$HOST -P$PORT -u$USER -pabc\&2016 $DB $TAB >$TAB.sql
http://www.jb51.net/article/10137.htm