shell 连接 mysql 导出数据
时间:2011-04-28 来源:Jason-zy
_file=./te2.txt
_mysql=/usr/bin/mysql
_db_host=-h192.168.1.1
_db_port=-P3306
_db_user=-ujason
_db_password=-p123
rm $_file
${_mysql} ${_db_host} ${_db_port} ${_db_user} ${_db_password} -NB -e "show full processlist;" >> ${_file}
_mysql=/usr/bin/mysql
_db_host=-h192.168.1.1
_db_port=-P3306
_db_user=-ujason
_db_password=-p123
rm $_file
${_mysql} ${_db_host} ${_db_port} ${_db_user} ${_db_password} -NB -e "show full processlist;" >> ${_file}
相关阅读 更多 +