Your data service configuration might not be supported if you do not adhere to these requirements.
Use the requirements in this section to plan the installation and configuration of Sun Cluster HA for MySQL. These requirements apply to Sun Cluster HA for MySQL only. You must meet these requirements before you proceed with your Sun Cluster HA for MySQL installation and configuration.
MySQL components and their dependencies —The Sun Cluster HA for MySQL data service can be configured to protect a MySQL instance and its respective components. These components, and their dependencies between each other, are briefly described below.
Table 1–3 MySQL components and their dependencies (via -> symbol)
Componet |
Description |
---|---|
MySQL Server |
-> SUNW.HAStoragePlus resource The SUNW.HAStoragePlus resource manages the MySQL File System Mount points and ensures that MySQL is not started until these are mounted. |
The MySQL component has two configuration and registration files under /opt/SUNWscmys/util. These files allow you to register the MySQL component with Sun Cluster and prepare a MySQL instance to be registered
Within these files, the appropriate dependencies have already been applied.
# cd /opt/SUNWscmys # # ls -l util -rwxr-xr-x 1 root other 1208 Mar 25 13:49 ha_mysql_config -rwxr-xr-x 1 root other 820 Mar 25 13:55 ha_mysql_register -rwxr-xr-x 1 root other 1105 Apr 16 07:48 mysql_config -rwxr-xr-x 1 root other 2993 Apr 11 10:57 mysql_register # # more util/*config :::::::::::::: util/mysql_config :::::::::::::: # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This file will be sourced in by mysql_register and the parameters # listed below will be used. # # Where is mysql installed (BASEDIR) MYSQL_BASE= # Mysql admin-user for localhost MYSQL_USER= # Password for mysql admin user MYSQL_PASSWD= # Configured logicalhost MYSQL_HOST= # Specify a username for a faultmonitor user FMUSER= # Pick a password for that faultmonitor user FMPASS= # Socket name for mysqld ( Should be /tmp/<logical host>.sock ) MYSQL_SOCK=/tmp/<logical host>.sock # FOR SC3.1 ONLY, Specify the physical hostname for the # physical NIC that this logicalhostname belongs to for every node in the # cluster this Resourcegroup can located on. # IE: The logicalhost lh1 belongs to hme1 for physical-node phys-1 and # hme3 for physical-node phys-2. The hostname for hme1 is phys-1-hme1 and # for hme3 on phys-2 it is phys-2-hme3. # IE: MYSQL_NIC_HOSTNAME="phys-1-hme1 phys-2-hme3" MYSQL_NIC_HOSTNAME="" :::::::::::::: util/ha_mysql_config :::::::::::::: # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This file will be sourced in by ha_mysql_register and the parameters # listed below will be used. # # These parameters can be customized in (key=value) form # # RS - name of the resource for the application # RG - name of the resource group containing RS # BASEDIR - name of the Mysql bin directory # DATADIR - name of the Mysql Data directory # MYSQLUSER - name of the user Mysql should be started of # LH - name of the LogicalHostname SC resource # FMUSER - name of the Mysql fault monitor user # FMPASS - name of the Mysql fault monitor user password # LOGDIR - name of the directory mysqld should store it's logfile. # CHECK - should HA-MySQL check MyISAM index files before start YES/NO. # HAS_RS - name of the mysql HAStoragePlus SC resource # # The following examples illustrate sample parameters # for Mysql # # BASEDIR=/usr/local/mysql # DATADIR=/global/mysqldata # MYSQLUSER=mysql # LH=mysqllh # FMUSER=fmuser # FMPASS=fmuser # LOGDIR=/global/mysqldata/logs # CHECK=YES # RS= RG= BASEDIR= DATADIR= MYSQLUSER= LH= FMUSER= FMPASS= LOGDIR= CHECK= HAS_RS= # |
The my.cnf file — The Sun Cluster HA for MySQL data service provides two sample my.cnf files, one sample file for a master configuration and one for a slave configuration, however you should ensure that at least the following parameters are set.
The my.cnf file is a important file within MySQL. Therefore you are recommended to refer to the MySQL Documentation for complete configuration information on the parameters that follow.
MySQL my.cnffile in [mysqld]section in a master configuration
bind address has to be set to the defined logical host.
socket should be defined as /tmp/<logical host>.sock.
binlog-ignore-db should contain sc3_test_database if log-bin option is being used.
MySQL my.cnffile in [mysqld]section in a slave configuration
bind address has to be set to the defined logical host.
socket should be defined as /tmp/<logical host>.sock.
binlog-ignore-db should contain sc3_test_database if log-bin option is being used.
master—host is the hostname where the master instance resides.
master—user is the username the slave will use for indentification to the master.
master—password is the password the slave will use for indentification to the master.
master-info-file is the location of the file that remembers where we left off on the master during the replication process. This file should be placed on a GFS/FFS