Go to main content

Oracle® Solaris Cluster Data Service for MySQL Cluster Guide

Exit Print View

Updated: September 2015
 
 

How to Install and Configure MySQL Cluster

Before You Begin

Ensure that the MySQL Cluster software is downloaded. If not, go to Installing and Configuring MySQL Cluster to install it on your cluster. Then return here to continue.


Note -  For complete information about installing MySQL Cluster, go to http://www.mysql.com/.

For a complete example of deployment in a global zone, see Appendix B, Deployment Example: Installing HA for MySQL Cluster in a Global Cluster.

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.

  1. Install the MySQL Cluster binaries on all nodes.
    # cd dir-path
    # /usr/sfw/bin/gtar xzvf downloaded-MySQL-Cluster-version
    # ln -s ./created-dir ./mysql
  2. Create the MySQL Cluster user and group on all nodes.
    # groupadd -g 1000 mysql
    # useradd -u 1000 -g 1000 -d /local/mysql -s /bin/sh mysql
  3. Change the owner of the MySQL Cluster on all nodes.
    # chown -RL mysql:mysql ./mysql
  4. Create the data directory for the management server on all nodes to host the management server.
    # mkdir MySQL-Cluster-management-server-data-directory
  5. Create the MySQL Cluster management server config.ini file according to your requirements.

    The HA for MySQL Cluster 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
  6. Create the MySQL Cluster ndb daemon my.cnf file.

    The HA for MySQL Cluster 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
  7. Install a MySQL Cluster server on all nodes that you want to host a MySQL Cluster server.

    Refer to Oracle Solaris Cluster Data Service for MySQL Guide . As an alternative, you can refer to Appendix B, Deployment Example: Installing HA for MySQL Cluster in a Global Cluster


    Note -  Make sure to stop the installation process after bootstrapping the MySQL Cluster database and changing the file permissions. If you want to use a sample configuration file for your MySQL Cluster server configuration, use /opt/SUNWscmys/etc/my.cnf_sample_mysqld_cluster. You must still edit that file to reflect your configuration values.