Ai
97 Star 247 Fork 112

茹憶/MySQLMTOP

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_mysql.py 507 Bytes
一键复制 编辑 原始数据 按行查看 历史
ruzuojun 提交于 2017-07-28 15:36 +08:00 . 代码目录结构重新调整和优化
#!//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()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ruyi1024/MySQLMTOP.git
git@gitee.com:ruyi1024/MySQLMTOP.git
ruyi1024
MySQLMTOP
MySQLMTOP
master

搜索帮助