~maingroup/mysql-multi-instance-starter/trunk

« back to all changes in this revision

Viewing changes to README.txt

  • Committer: maingroup
  • Date: 2010-07-31 00:58:29 UTC
  • Revision ID: maingroup@localhost.localdomain-20100731005829-gs4j8paixlkt0e5e
trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
MySQL Multi Instance Starter:
 
2
 
 
3
Author:
 
4
        Howard A Chou  <maingroup@yahoo.com>
 
5
        
 
6
Introduction:
 
7
        This project is written in Python.  Running multiple instances of MySQL server daemons on one single machine has always been tricky.  There are a lot of preparation steps a DBA has to go through before he/she can even attempt to start another instance of MySQL daemon.  I wrote this program to help MySQA DBAs to automate the preparation process, and make starting multiple instances of MySQL server daemons on shared binaries a freeze.  Don't get confused with having multiple installations of MySQL running simultaneously on a single machine.  This program only requires ONE installation of MySQL.  The program will take care of the rest.         The source code of the this program can be downloaded from launchpad.net.
 
8
 
 
9
        Due to my limited resources, I only tested the program on Red hat, Fedora, and CentOS distros.  I need volunteer QAs who can test the program on other distros for me such as Debian, FreeBSD, etc.
 
10
 
 
11
Requirements:
 
12
        1.  A Linux box with MySQL already installed.
 
13
        2.  Python.
 
14
        3.  You must be a DBA with proper privileges to run this program.
 
15
 
 
16
Instructions:
 
17
        This program was tested on Redhat, Fedora, and CentOS distributions only.  MySQL server was installed via YUM, with standard installation directories.  Since this program is geared toward DBAs.  Only DBAs are allowed to start multiple instances of MySQL daemon.  In Red hat and many other distros, MySQL DBA has a user name of mysql and group name of mysql.  Its home directory is at /var/lib/mysql.
 
18
 
 
19
        There is no theoretical limit on the number of mysql instances you can run on your system.  However, it is extremely rare for anyone wants to run more than one instance in addition to the daemon that is already running.  This program limits the maximum mysql new instances to five, even though it can be relaxed.  
 
20
 
 
21
        Download the source code into the home directory of MySQL DBA.  To start the program, type python mysqlMulti.py.  The program verifies the user' DBA status, then proceed to create directories to host MySQL instances.  A DBA can choose to host the instances in other directories if he/she has write privileges to that directory.
 
22
 
 
23
        Next, the program process to ask for the number of instances the DBA wants to initialize.  The max is set at 5, even though it can relaxed easily.  After the DBA picks the number of instances, the program creates directories for hosting instances.  The directories are named as mysqlMulti0, mysqlMulti1, mysqlMulti2, etc.  The program then checks to make sure that no other copies of mysql is running in any of the above directories.  Then the program checks the mysql host tables in the instance directories.  If the table is missing, then install the tables by initializing mysql_install_db.
 
24
 
 
25
        In the final step, the program checks the availability of the TCP ports.  It starts the testing at 3306, then increment by 1 until it finds an available port.  The program then launches the instance by calling mysql_safe program. 
 
26
 
 
27
 
 
28
        
 
29
 
 
30
  
 
31
        
 
32