Overview
mMAIM's job is to make a it easy to monitor and analyze MySQL
servers and to easily integrate itself into any environment. It can show
Master/Slave sync stats, some efficiency stats, can return statistics
from most of the "show" command, and more!
The purpose of MySQLQuery is to perform queries relating to MySQL
internals. It is not intended to run generic sql queries.
mMaim is distributed under the terms of the
LGPL License.
For downloads, news, and other information, visit our
Project Page
Example
This is by no means a complete example; it simply gives you a
feel for what the mMAIM API looks like.
from maim import *
# These options assume you have a very insecure server.
h1 = '127.0.0.1'
hosts = {}
hosts[h1] = {'username' : 'root',
'host' : h1,
'password' : '',
'port' : 3306
}
mq = mysql_query.Status()
mq.AddHostsByDic(hosts)
reports = mq.QueryHost(query_list=['status'])
if mq.GetReportStatus(host=h1, report='status'):
ref = reports[h1]['status']
keys = ref.keys()
keys.sort()
for key in keys: print "%-35s %-15s" % (key, ref[key])
else:
print "ERROR: the status report failed."
print "REPORT ERRORS:", \
mq.GetReportErrors(host=h1, report='status')
print "HOST ERRORS:", \
mq.GetHostErrors(host=h1)
|
|
Documentation
mysql_query
Download
For downloads, visit our
Project Page
News
- Initial Launch, April 2005
See the Project
Page for news archives.
Google Groups
Bug reports and patches
|