openark forge

Open source utilities
 

Installation

mycheckpoint downloads in the following flavors:

  • .deb package
  • .rpm package (noarch)
  • python install package
  • script source

The entire tool lies withing a single python script, which make it easy to install or use.

Package requirements

To run mycheckpoint, you must have the python (>= 2.4) and the python-mysql module installed.

On any reasonably recent Linux distribution, python (>= 2.4) should already be installed. However, the python-mysql driver does not come installed by default on all common Linux distros. Recent RedHat, Fedora, CentOS should include it by default.

On Debian, Ubuntu and derived distros, one can install the python-mysql module with:

sudo apt-get install python-mysqldb

On RedHat, CentOS and derived distros, one can:

yum install MySQL-python

For other distros, BSD, etc, please refer to the python-mysql README file.

Installing mycheckpoint

Using .deb package:

sudo dpkg -i mycheckpoint-XXX.deb

Using .rpm package:

sudo rpm -i mycheckpoint-xxx.rpm

Using python package:

tar xzfv mycheckpoint-XXX.tar.gz
cd mycheckpoint-XXX
sudo python setup.py install

If you choose to download the script file, there’s not much to do; it’s ready for use. You may choose to:

chmod +x mycheckpoint-XXX
sudo mv mycheckpoint-XXX /usr/bin/mycheckpoint

Schema, accounts and privileges

By default, mycheckpoint uses the ‘mycheckpoint‘ schema. The schema must exist beforehand. You may choose to use another schema with –database=some_other_schema.

mycheckpoint runs under the privileges of some user. It can use the ‘root’ account or any other existing or specially created account. Whatever the account, it must have full privileges on the designated schema.

Must have

Assuming you do not change the default ‘mycheckpoint’ schema, the following are required:

CREATE DATABASE mycheckpoint;
GRANT ALL PRIVILEGES ON mycheckpoint.* TO 'monitoring_user'@'localhost' IDENTIFIED BY 'some_password';

Edit the above settings as you see fit.

Optional

To monitor slave replication status, the user must also be granted with either the REPLICATION CLIENT or SUPER privileges; the former being safer to grant. For example:

GRANT REPLICATION CLIENT ON *.* TO 'monitoring_user'@'localhost'

To monitor master status, the user must be granted with the SUPER privilege:

GRANT SUPER ON *.* TO 'monitoring_user'@'localhost'

If the account has the SUPER privilege, all is well; if it only has REPLICATION CLIENT, then master status will not be monitored. If none of these privileges are defined, neither slave nor master status will be monitored, but no error is thrown.

By default, mychckpoint allows for binary logging. If you wish to disable binary logging for insert/purge statements, use –disable-bin-log; the account must then have the SUPER privilege.

For future revisions, prepare the account by allowing it to issue SHOW PROCESSLIST:

GRANT PROCESS ON *.* TO 'monitoring_user'@'localhost'
 
Powered by Wordpress and MySQL. Theme by openark.org