使用重定向[2>$QUAL_HOME/tmp/null]:
mysql -u$MYSQLUSER -p$MYSQLPSWD 2>$QUAL_HOME/tmp/null
如下测试:
mysql -u$MYSQLUSER -p$MYSQLPSWD 2>$QUAL_HOME/tmp/null -N -e "use information_schema;set names utf8;
select count(column_name)
from columns where table_name='${table}' order by ordinal_position " ;