97 Star 212 Fork 104

茹憶。 / MySQLMTOP

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
test_mysql.py 507 Bytes
Copy Edit Web IDE Raw Blame History
#!//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()

Comment ( 0 )

Sign in for post a comment

Python
1
https://git.oschina.net/ruzuojun/MySQLMTOP.git
git@git.oschina.net:ruzuojun/MySQLMTOP.git
ruzuojun
MySQLMTOP
MySQLMTOP
master

Search