vc_sniffer_time=5port=sys.argv[1] vc_cmd="""/usr/bin/timeout %s /data/software/vc-mysql-sniffer -binding="[::]:%s" > /tmp/tmp_vc_mysql_%s.txt"""%(vc_sniffer_time,port,port) outtext=commands.getoutput(vc_cmd) cmd="""grep -Ev '# Time:|# User@Host' /tmp/tmp_vc_mysql_...
import commands vc_sniffer_time=5 port=sys.argv[1] vc_cmd=""" /usr/bin/timeout %s /data/software/vc-mysql-sniffer -binding="[::]:%s" > /tmp/tmp_vc_mysql_%s.txt """ % (vc_sniffer_time,port,port) outtext = commands.getoutput(vc_cmd) cmd=""" grep -Ev ‘# Time:|# User@...
vc-mysql-sniffer统计MySQL的SQL分布 2018-01-11 10:11 −... yayun 3 2464 Node.js 连接 MySQL 2019-12-09 10:04 −安装数据库驱动 直接安装 npm install mysql 使用了淘宝定制的 cnpm 命令进行安装: cnpm install mysql 连接数据库 var mysql = require('mysql'); var connection = mysql.createConn...