Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Cluster Data Service for MySQL Cluster Guide Oracle Solaris Cluster 3.3 3/13 |
1. Installing and Configuring HA for MySQL Cluster
Overview of Installing and Configuring HA for MySQL Cluster
Planning the HA for MySQL Cluster Installation and Configuration
MySQL Cluster and Oracle Solaris Containers
Oracle Solaris Cluster HA for MySQL Cluster Components
Dependencies Between HA for MySQL Cluster Components
Installing and Configuring MySQL Cluster
How to Enable a MySQL Cluster Database to Run in a Global Zone Configuration
How to Install and Configure MySQL Cluster in a Global Zone
How to Enable a Zone to Run MySQL Cluster in a Zone Configuration
How to Install and Configure MySQL Cluster in a Non Global Zone
Verifying the Installation and Configuration of MySQL Cluster
How to Verify the Installation and Configuration of MySQL Cluster
Installing the HA for MySQL Cluster Packages
How to Install the HA for MySQL Cluster Packages
Registering and Configuring HA for MySQL Cluster
Specifying Configuration Parameters for the MySQL Cluster Management Server Resource
How to Create and Enable Resources for MySQL Cluster Management Server
Specifying Configuration Parameters for the MySQL Cluster ndb Daemon Resource
How to Create and Enable Resources for the MySQL Cluster ndb Daemon
Specifying Configuration Parameters for the MySQL Cluster ndb Shutdown Controller Resource
How to Create and Enable Resources for MySQL Cluster ndb Shutdown Controller
How to Suspend the ndb Shutdown Controller's Stop Action
How to Create and Enable Resources for the MySQL Server
Verifying the HA for MySQL Cluster Installation and Configuration
How to Verify the HA for MySQL Cluster Installation and Configuration
Tuning the HA for MySQL Cluster Fault Monitor
Operation of the HA for MySQL Cluster Management Server Parameter File
Operation of the HA for MySQL Cluster ndb Daemon Parameter File
Operation of the Fault Monitor for HA for MySQL Cluster Management Server
Operation of the Fault Monitor for HA for MySQL Cluster ndb Daemon
Debugging HA for MySQL Cluster
How to Activate Debugging for HA for MySQL Cluster
A. Files for Configuring HA for MySQL Cluster
B. Deployment Example: Installing MySQL Cluster in the Global Zone
C. Deployment Example: Installing MySQL Cluster in a Non-Global Zone
This section explains the special requirements for installing MySQL Cluster for use with HA for MySQL Cluster. For complete information about installing and configuring MySQL Cluster, see http://www.mysql.com/. For complete information about installing and configuring a Solaris Container, see System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones.
The MySQL version delivered with the Oracle Solaris OS is a pure MySQL server version. It does not include MySQL Cluster. You must obtain MySQL Cluster software from http://www.mysql.com/.
Determine whether you have to configure HA for MySQL Cluster to run in a global zone, a non-global zone or a zone cluster configuration. The global zone configuration procedure is applicable if you install MySQL Cluster in the global zone or in a zone cluster.
To install and configure MySQL Cluster in a global zone configuration, or in a zone cluster configuration, complete the following tasks:
To install and configure MySQL Cluster in a non-global zone configuration, complete the following tasks:
How to Enable a Zone to Run MySQL Cluster in a Zone Configuration
How to Install and Configure MySQL Cluster in a Non Global Zone
For a complete example of deploying in a global zone, see Appendix B, Deployment Example: Installing MySQL Cluster in the Global Zone.
# cluster set -p heartbeat_quantum=50%-of-heartbeat-timeout \ -p heartbeat-timeout=value-in-milliseconds
# zlogin zone-name
# clresourcetype register SUNW.gds
# clresourcegroup create Shared-Address-resource-group
# clressharedaddress create -g Shared-Address-resource-group Shared-Address-resource
# clresourcegroup online -eM Shared-Address-resource-group
# clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 mgmd-resource-group
# clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 ndbd-resource-group
# clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 mysql-resource-group
# clresourcegroup set -p rg_affinities=++ndbd-resource-group mysql-resource-group
Before You Begin
Ensure that the Oracle Solaris Cluster HA for MySQL package (SUNWscmys) is installed during your initial Oracle Solaris Cluster installation, if not then proceed to Installing the HA for MySQL Cluster Packages to install it on your cluster. Return here to continue Installing and Configuring MySQL Cluster.
For a complete example of deployment in a global zone, see Appendix B, Deployment Example: Installing MySQL Cluster in the Global Zone.
The sample commands in this task assume the following values:
The user and the group that owns the MySQL Cluster are named mysql.
The MySQL Cluster data is installed in the root file system. This system can be any file system, including ZFS.
# cd dir-path # /usr/sfw/bin/gtar xzvf downloaded-MySQL-Cluster-version # ln -s ./created-dir ./mysql
# groupadd -g 1000 mysql # useradd -u 1000 -g 1000 -d /local/mysql -s /bin/sh mysql
# chown -RL mysql:mysql ./mysql
# mkdir MySQL-Cluster-management-server-data-directory
The Oracle Solaris Cluster HA for MySQL data service provides a sample config.ini file for the MySQL Cluster management server.
The contents of /opt/SUNWscmys/ndb_mgmd/etc/config.ini_sample provides a sample MySQL Cluster configuration file that you can use to create your MySQL Cluster instance MySQL Cluster Management Server Datadirectory/config.ini. You must still edit that file to reflect your configuration values.
# cp /opt/SUNWscmys/ndb_mgmd/etc/config.ini_sample \ MySQL-Cluster-Management-Server-Data-Directory/config.ini
The Oracle Solaris Cluster HA for MySQL data service provides a sample my.cnf file for the MySQL Cluster ndb daemon.
The content of /opt/SUNWscmys/ndbd/etc/my.cnf_sample provides a sample MySQL Cluster configuration file for the ndb daemons, that you can use to create your MySQL Cluster instance MySQL Cluster ndb Daemon Datadirectory/my.cnf. You must still edit that file to reflect your configuration values.
# cp /opt/SUNWscmys/ndbd/etc/my.cnf_sample \ MySQL-Cluster-ndb-Daemon-Data-Directory/my.cnf
Refer to Oracle Solaris Cluster Data Service for MySQL Guide. As an alternative, you can refer to Appendix B, Deployment Example: Installing MySQL Cluster in the Global Zone
Note - Make sure to stop the installation process after bootstrapping the MySQL database and changing the file permissions. If you want to use a sample configuration file for your MySQL server configuration, use /opt/SUNWscmys/etc/my.cnf_sample_mysqld_cluster. You must still edit that file to reflect your configuration values.
For a complete example of deploying in a non-global zone, see Appendix C, Deployment Example: Installing MySQL Cluster in a Non-Global Zone.
Perform the following steps as a super user in the global zone.
# cluster set -p heartbeat_quantum=half-of-heartbeat-timeout -p heartbeat_timeout=value-in-milliseconds
# clnode set -p zprivatehostname=alias1 node1:zone1 # clnode set -p zprivatehostname=alias2 node2:zone2
# clresourcetype register SUNW.gds
# clresourcegroup create -n node1:zone1,node 2:zone 2 \ > Shared-Address-resource-group
# clressharedaddress create -g Shared-Address-resource-group Shared-Address-resource
# clresourcegroup online -eM Shared-Address-resource-group
# clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 \ > -n node1:zone1,node2:zone2 mgmd-resource-group
# clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 \ > -n node1:zone1,node2:zone2 ndbd-resource-group
# clresourcegroup create -p maximum_primaries=2 -p desired_primaries=2 \ > -n node1:zone1,node2:zone2 mysql-resource-group
Before You Begin
Ensure that the Oracle Solaris Cluster HA for MySQL package (SUNWscmys) is installed during your initial Oracle Solaris Cluster installation, if not then proceed to Installing the HA for MySQL Cluster Packages to install it on your cluster. Return here to continue Installing and Configuring MySQL Cluster.
For a complete example of deployment in a global zone, see Appendix C, Deployment Example: Installing MySQL Cluster in a Non-Global Zone.
The sample commands in this task assume the following values:
The user and the group which owns the MySQL Cluster are named mysql.
The MySQL Cluster data is installed in the root file system. It can also be in any other file system, including ZFS.
The MySQL Cluster binaries are installed under /usr/local.
# mkdir /usr/local # cd /usr/local # /usr/sfw/bin/gtar xzvf downloaded-MySQL-Cluster-version # ln -s ./dir-created ./mysql
# groupadd -g 1000 mysql # useradd -u 1000 -g 1000 -d /local/mysql -s /bin/sh mysql
# chown -RL mysql:mysql /usr/local/mysql
# zlogin zone1
# groupadd -g 1000 mysql # useradd -u 1000 -g 1000 -d /local/mysql -s /bin/sh mysql
# chown -RL mysql:mysql /usr/local/mysql
# mkdir MySQL-Cluster-Management-Server-Data-Directory
The Oracle Solaris Cluster HA for MySQL data service provides a sample config.ini file for the MySQL Cluster management server.
The contents of /opt/SUNWscmys/ndb_mgmd/etc/config.ini_sample provides a sample MySQL Cluster configuration file that you can use to create your MySQL Cluster instance MySQL Cluster Mangement Server Datadirectory/config.ini. You must still edit that file to reflect your configuration values.
# cp /opt/SUNWscmys/ndb_mgmd/etc/config.ini_sample \ MySQL-Cluster-Management-Server-Data-Directory/config.ini
# mkdir MySQL-Cluster-ndb-Daemon-Data-Directory
The content of /opt/SUNWscmys/ndbd/etc/my.cnf_sample provides a sample MySQL Cluster configuration file. You can use this sample to create your MySQL Cluster ndb daemon instance MySQL Cluster ndb Daemon Datadirectory/my.cnf file.
# cp /opt/SUNWscmys/ndbd/etc/my.cnf_sample \ MySQL-Cluster-ndb-daemon-data-directory/my.cnf
For more information, refer to the Oracle Solaris Cluster Data Service for MySQL Guide.
Note - Make sure to stop the installation process after bootstrapping the MySQL database and changing the file permissions. If you want to use a sample configuration file for the MySQL server, use /opt/SUNWscmys/etc/my.cnf_sample_mysqld_cluster.