1 Star 0 Fork 109

paste / MySQLMTOP

forked from 茹憶 / MySQLMTOP 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test_mysql.py 507 Bytes
一键复制 编辑 原始数据 按行查看 历史
ruzuojun 提交于 2017-07-28 15:36 . 代码目录结构重新调整和优化
#!//bin/env python
#coding:utf-8
import os
import sys
import string
import MySQLdb
import global_functions as func
def main():
#get mysql servers list
user = func.get_config('mysql_db','username')
passwd = func.get_config('mysql_db','password')
servers=func.mysql_query("select id,host,port,application_id,status from servers where is_delete=0;")
if servers:
for row in servers:
print row
else:
print "MySQLDB OK!"
if __name__=='__main__':
main()
Python
1
https://gitee.com/paste/MySQLMTOP.git
git@gitee.com:paste/MySQLMTOP.git
paste
MySQLMTOP
MySQLMTOP
master

搜索帮助