JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for MySQL Guide     Oracle Solaris Cluster 4.1
search filter icon
search icon

Document Information


1.  Installing and Configuring HA for MySQL

A.  Deployment Example: Installing MySQL in the Global Zone

B.  Deployment Example: Installing MySQL in the Non-Global HA Zone

Target Cluster Configuration

Software Configuration


Installing and Configuring MySQL on Local Storage in the HA Zone

Example: Preparing the Cluster for MySQL

Example: Configuring Cluster Resources for MySQL

Example: Configuring the HA Container

Example: Installing and Bootstrapping the MySQL Software on Local Storage

Example: Modifying the MySQL Configuration Files

Example: Enabling the MySQL Software to Run in the Cluster

C.  Deployment Example: Installing MySQL in a Scalable or Multiple-Master Configuration


Example: Installing and Bootstrapping the MySQL Software on Local Storage

These steps illustrate how to install the MySQL software in the default directory /usr/local/MYSql. If only one node is mentioned, it needs to be the node where your resource group is online.

Note - This procedure assumes that you inherited /usr, so you cannot write to /usr/local in the zones. If you linked /usr/local to a local directory, start at step 4.

  1. Add the mysql user.
    phys-schost-1# groupadd -g 1000 mysql
    phys-schost-1# useradd -g 1000 -d /global/mnt3/mysql -m -s /bin/ksh mysql
  2. Install the MySQL binaries on both nodes.
    phys-schost-1# cd /usr/local
    phys-schost-1# tar xvf mysql-max-5.0.22-solaris10-architcture_64.tar.gz
    phys-schost-1# ln -s mysql-max-5.0.22-solaris10-x86_64 mysql
  3. Change the ownership of the MySQL binaries on both nodes.
    phys-schost-1# chown -R mysql:mysql /usr/local/mysql
  4. Log in to the zone.
    phys-schost-1# zlogin clu1
  5. Create the parent for the mysql home directory.
    zone# mkdir -p /global/mnt3
  6. Add the mysql user.
    zone# groupadd -g 1000 mysql
    zone# useradd -g 1000 -d /global/mnt3/mysql -m -s /bin/ksh mysql
  7. Create your database directories.
    zone# mkdir -p /global/mnt3/mysql-data/logs
    zone# mkdir /global/mnt3/mysql-data/innodb
    zone# mkdir /global/mnt3/mysql-data/BDB
  8. Bootstrap MySQL.
    zone# cd /usr/local/mysql
    zone# ./scripts/* --datadir=/global/mnt3/mysql-data
  9. Create your my.cnf configuration file in /global/mnt3/mysql-data.
    zone# cat > /global/mnt3/mysql-data/my.cnf << EOF
    # is the address of the logical host
    bind-address= # this is the address of the logical host
    # Innodb
    innodb_data_home_dir = /global/mnt3/mysql-data/innodb
    innodb_data_file_path = ibdata1:10M:autoextend
    innodb_log_group_home_dir = /global/mnt3/mysql-data/innodb
    innodb_log_arch_dir = /global/mnt3/mysql-data/innodb
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    set-variable = innodb_buffer_pool_size=50M
    set-variable = innodb_additional_mem_pool_size=20M
    # Set .._log_file_size to 25 % of buffer pool size
    set-variable = innodb_log_file_size=12M
    set-variable = innodb_log_buffer_size=4M
    set-variable = innodb_lock_wait_timeout=50
    # BDB
    # uncomment the skip-bdb if you used a binary download.
    # binary downloads come very often without the bdb support.
    # Replication of Slave
    # MySQL 4.x
  10. Change the ownership of the MySQL data directory.
    zone# chown -R mysql:mysql /global/mnt3/mysql-data
  11. Change the permission of the my.cnf file.
    zone# chmod 644 /global/mnt3/mysql-data/my.cnf