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

Document Information

Preface

1.  Installing and Configuring HA for MySQL

Installing and Configuring HA for MySQL

HA for MySQL Overview

Planning the HA for MySQL Installation and Configuration

MySQL and Solaris Containers

Configuration Restrictions

Restriction for the HA for MySQL Data Service Configuration

Restrictions on the MySQL Configuration File

Restrictions for the MySQL Configurations

Restrictions on the MySQL Database Directory

Restriction for the MySQL smf Service Name in an HA Container

Examples for the File Systems Layout

Configuration Requirements

Components and Their Dependencies for HA for MySQL

Registration and Configuration File for HA for MySQL

Explanation of the my.cnf File

Installing and Configuring MySQL

Enabling MySQL to Run in a Global Zone Configuration

How to Enable MySQL for a Failover Resource

How to Enable MySQL to Run in a Scalable Configuration

How to Enable MySQL to Run in a Multiple-Master Configuration

How to Install and Configure MySQL in a Global Zone

Enabling MySQL to Run in a Zone Configuration

How to Enable MySQL for a Failover Resource

How to Enable MySQL to Run in a Scalable Configuration

How to Enable MySQL to Run in a Multiple-Master Configuration

How to Install and Configure MySQL in a Zone

How to Enable MySQL to run in an HA Container Configuration

How to Install and Configure MySQL in an HA Container

Verifying the Installation and Configuration of MySQL

How to Verify the Installation and Configuration of MySQL

Installing the HA for MySQL Packages

How to Install the HA for MySQL Packages

Registering and Configuring HA for MySQL

How to Register and Configure HA for MySQL as a Failover Service in a Global Zone Configuration

How to Register and Configure HA for MySQL as a Failover Service in a Zone Configuration

How to Register and Configure HA for MySQL as a Failover Service in an HA Container Configuration

How to Modify Parameters in the HA for MySQL Manifest

How to Remove an HA for MySQL Resource From an HA Container

How to Add an HA for MySQL Resource in a Scalable or Multiple-Master Configuration

Verifying the HA for MySQL Installation and Configuration

How to Verify the HA for MySQL Installation and Configuration

Understanding the HA for MySQL Fault Monitor

Resource Properties

Probing Algorithm and Functionality

Debugging the HA for MySQL

How to Activate Debugging for HA for MySQL

Upgrade to Oracle Solaris Cluster 3.3 When Using HA for MySQL

Upgrade From Sun Cluster 3.1 8/05 to Oracle Solaris Cluster 3.3 When Using HA for MySQL

Upgrade to MySQL 4.x.x From 3.23.54 When Using HA for MySQL

Upgrade to MySQL Version 4.x.x From Version 3.23.54

A.  Deployment Example: Installing MySQL in the Global Zone

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

C.  Deployment Example: Installing MySQL in a Non-Global Zone

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

Index

Installing and Configuring MySQL

This section contains the procedures you need to install and configure MySQL.

References will be made to certain directories for MySQL. The following list shows common path names for these references. For more information, refer to the Configuration Restrictions section.

Determine how MySQL will be deployed in an Oracle Solaris Cluster configuration.

To install and configure MySQL in a global-zone configuration, complete the following tasks:

To install and configure MySQL in a non-global zone configuration, complete the following tasks:

To install and configure MySQL in an HA container configuration, complete the following tasks:

You will find installation examples for each zone type in the following appendixes:

Enabling MySQL to Run in a Global Zone Configuration

Determine whether you need to install MySQL in a failover, scalable, or multiple-master configuration and follow the appropriate procedure:

How to Enable MySQL for a Failover Resource

  1. Become superuser or assume a role that provides solaris.cluster.adminRBAC authorization on one of the nodes in the cluster that will host MySQL.
  2. Register the SUNW.gds and SUNW.HAStoragePlus resource type.
    # clresourcetype register SUNW.gds SUNW.HAStoragePlus
  3. Create a failover resource group.
    # clresourcegroup create MySQL-failover-resource-group
  4. Create a resource for the MySQL disk storage.
    # clresource create \
    -g MySQL-failover-resource-group \
    -t SUNW.HAStoragePlus \
    -p FilesystemMountPoints=MySQL-instance-mount-points MySQL-has-resource
  5. Create a resource for the MySQL logical hostname.
    # clreslogicalhostname \
    -g MySQL-failover-resource-group \
    -h MySQL-logical-hostname \
    MySQL-lh-resource
  6. Enable the failover resource group that now includes the MySQL disk storage and Logical Hostname resources.
    # clresourcegroup online -M -n current-node MySQL-failover-resource-group

How to Enable MySQL to Run in a Scalable Configuration

  1. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on one of the nodes in the cluster that will host MySQL.
  2. Register the SUNW.gds resource type.
    # clresourcetype register SUNW.gds
  3. Create a failover resource group.
    # clresource create SharedAddress-failover-resource-group
  4. Create the shared address resource.
    # clressharedaddress create \ 
    -g SharedAddress-failover-resource-group 
    -h MySQL-logical-hostname \ 
    MySQL-lh-resource
  5. Enable the failover resource group that now includes the shared address resources.
    # clresourcegroup online -eM -n current-node MySQL-failover-resource-group
  6. Create a resource group to run on at minimum two nodes.
     # clresourcegroup create -p Maximum_primaries=2 \
    -p desired_primaries=2 MySQL-scalable-resource-group

How to Enable MySQL to Run in a Multiple-Master Configuration

  1. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.
  2. On one of the nodes in the cluster that will host MySQL, register the SUNW.gds resource type.
    # clresourcetype register SUNW.gds
  3. Create a resource group to run on at least two nodes.
    # clresourcegroup create -p Maximum_primaries=2 \
    -p desired_primaries=2 MySQL-scalable-resource-group

How to Install and Configure MySQL in a Global Zone

Before You Begin

If the HA for MySQL package (SUNWscmys) was not installed during your initial Oracle Solaris Cluster installation, proceed to Installing the HA for MySQL Packages to install it on your cluster. Return here to continue the Installation and Configuration of MySQL.

  1. Ensure that you are on the node where you have enabled your resource group.
  2. Install MySQL onto all nodes within Oracle Solaris Cluster.

    MySQL should be installed onto a cluster file system. For a discussion of the advantages and disadvantages of installing the software on local versus cluster file systems, see Determining the Location of the Application Binaries in Oracle Solaris Cluster Data Services Planning and Administration Guide.

    Download MySQL from http://www.mysql.com. If you intend to use local disks for the MySQL software, you will need to repeat this step on all nodes within Oracle Solaris Cluster.

  3. Create a mysql-user and mysql-group for MySQL on all nodes in the cluster that will run MySQL.

    Create an entry in /etc/group on all nodes with Oracle Solaris Cluster.

    # groupadd -g 1000 mysql

    Create an entry in /etc/passwd on all nodes within Oracle Solaris Cluster. This user should have a locked password.

    # useradd -u 1000 -g 1000 -d /global/mysql -s /bin/sh mysql
  4. Change the owner and the group for MySQL binaries.

    If MySQL binaries are on all nodes, then repeat this step on every node.

    # chown -R mysql:mysql /global/mysql
  5. Create your MySQL Database directory for your MySQL instance or instances.
    # mkdir MySQL-Database-directory

    Note - Refer to Configuration Restrictions for a description of the MySQL Database directory and to Installing and Configuring MySQL for a list of common path names. For a multiple-master operating system scalable deployment, perform the remaining steps of this procedure on all nodes of the cluster that are about to host the MySQL database.


    The following listing shows one MySQL instance. MySQL is installed from http://www.mysql.com in /global/mysql, which is mounted as a cluster file system. The MySQL Database Directory for the MySQL instance is /global/mysql-data.

    # cd /global/mysql
    #
    # ls -l
    -rw-r--r--   1 mysql    mysql      19106 Dec 10 14:52 COPYING
    -rw-r--r--   1 mysql    mysql      28003 Dec 10 14:52 COPYING.LIB
    -rw-r--r--   1 mysql    mysql      44577 Dec  5 10:37 ChangeLog
    -rw-r--r--   1 mysql    mysql       6811 Dec 10 14:53 INSTALL-BINARY
    -rw-r--r--   1 mysql    mysql       1976 Dec  5 10:37 README
    drwxr-xr-x   2 mysql    mysql       1024 Dec 13 18:05 bin
    -rwxr-xr-x   1 mysql    mysql        773 Dec 10 15:34 configure
    drwxr-x---   3 mysql    mysql        512 Apr  3 12:23 data
    drwxr-xr-x   2 mysql    mysql       1024 Dec 10 15:35 include
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 lib
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 man
    -rw-r--r--   1 mysql    mysql    2582089 Dec 10 14:47 manual.html
    -rw-r--r--   1 mysql    mysql    2239278 Dec 10 14:47 manual.txt
    -rw-r--r--   1 mysql    mysql      94600 Dec 10 14:47 manual_toc.html
    drwxr-xr-x   6 mysql    mysql        512 Dec 10 15:35 mysql-test
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 scripts
    drwxr-xr-x   3 mysql    mysql        512 Dec 10 15:35 share
    drwxr-xr-x   7 mysql    mysql       1024 Dec 10 15:35 sql-bench
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 support-files
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 tests
    #
  6. Create the MySQL my.cnf file.

    The HA for MySQL data service provides three sample my.cnf files for MySQL. One sample configuration file is for a master configuration, one sample file is for a slave configuration, and one is for the server configuration in a MySQL cluster.

    The content of /opt/SUNWscmys/etc/my.cnf_sample_[master|slave|mysqld_cluster]provides a sample MySQL configuration file that you can use to create your MySQL instance MySQL-Database-directory/my.cnf. You must still edit that file to reflect your configuration values.

    # cp /opt/SUNWscmys/etc/my.cnf_sample_master \
     MySQL-Database-directory/my.cnf

    Note - If you are about to configure a multiple-master or a scalable configuration, set the socket directive in the my.cnf files to socket=/tmp/physical-host.sock.


  7. Bootstrap the MySQL instance.

    This creates the privilege tables db, host, user, tables_priv, and columns_priv in the mysql database, as well as the func table.

    # cd MySQL Base directory
    # ./scripts/mysql_install_db --datadir=MySQL-Database-directory
  8. Create a log file directory in MySQL Database Directory.
    # mkdir MySQL-Database-Directory/logs 
  9. Create directories for your storage engines.
    # mkdir MySQL-Database-Directory/innodb
    # mkdir MySQL-Database-Directory/BDB
  10. Change owner and group for MySQL-Database-Directory.
    # chown -R mysql:mysql MySQL Database Directory
  11. Change file permission for MySQL-Database-Directory/my.cnf.
    # chmod 644 MySQL-Database-Directory/my.cnf

Enabling MySQL to Run in a Zone Configuration

Determine whether to install MySQL in a failover, scalable, or multiple-master configuration and follow the appropriate procedure:

How to Enable MySQL for a Failover Resource

  1. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on one of the nodes in the cluster that will host MySQL.
  2. Create and boot your zone MySQL-zone on all the nodes to host your MySQL database.
  3. Register the SUNW.gds and SUNW.HAStoragePlus resource type.
    # clresourcetype register SUNW.gds SUNW.HAStoragePlus
  4. Create a failover resource group.
    # clresourcegroup create \ -n node1:MySQL-zone,node2:MySQL-zone \
    MySQL-failover-resource-group
  5. Create a resource for the MySQL disk storage.
    # clresource create  \
    -g MySQL-failover-resource-group \
    -t SUNW.HAStoragePlus  \
    -p FilesystemMountPoints=MySQL-instance-mount-points MySQL-has-resource
  6. Create a resource for the MySQL logical hostname.
    # clreslogicalhostname \
    -g MySQL-failover-resource-group \
    -h MySQL-logical-hostname \
    MySQL-lh-resource
  7. Enable the failover resource group that now includes the MySQL disk storage and logical hostname resources.
    # clresourcegroup online -M -n current-node MySQL-failover-resource-group

How to Enable MySQL to Run in a Scalable Configuration

  1. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on one of the nodes in the cluster that will host MySQL.
  2. Register the SUNW.gds resource type.
     # clresourcetype register SUNW.gds
  3. Create and boot your zone MySQL-zone on all the nodes to host your MySQL database.
  4. Create a failover resource group.
    # clresource create -n node1:zone1,node2:zone2 SharedAddress-failover-resourcegroup
  5. Create the shared address resource.
    # clressharedaddress create \
    -g SharedAddress-failover-resource-group \
    -h MySQL-logical-hostname \
    MySQL-lh-resource
  6. Enable the failover resource group that now includes the shared address resources.
    # clresourcegroup online -eM -n current-node MySQL-failover-resource-group
  7. Create a resource group to run on at minimum two nodes.
    # clresourcegroup create -p Maximum_primaries=2 \
    -p desired_primaries=2 \
    -n node1:zone1,node2:zone2 \
    MySQL-scalable-resource-group

How to Enable MySQL to Run in a Multiple-Master Configuration

  1. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.
  2. On one of the nodes in the cluster that will host MySQL, register the SUNW.gds resource type.
    # clresourcetype register SUNW.gds
  3. Create a resource group to run on at least two nodes.
    # clresourcegroup create \
    -p Maximum_primaries=2 \
    -p desired_primaries=2 -n node1:zone1,node2:zone2 \
    MySQL-scalable-resource-group

How to Install and Configure MySQL in a Zone

Before You Begin

If the HA for MySQL package (SUNWscmys) was not installed during your initial Oracle Solaris Cluster installation, proceed to Installing the HA for MySQL Packages to install it on your cluster. Return here to continue the installation and configuration of MySQL.

  1. Ensure that you are on the node where you have enabled your resource group.
  2. Log in to your zone.
    # zlogin MySQL-zone
  3. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on one of the nodes in the cluster that will host MySQL.
  4. Install MySQL on all nodes within Oracle Solaris Cluster.

    IMySQL should be installed onto a cluster file system. For a discussion of the advantages and disadvantages of installing the software on local versus cluster file systems, see Determining the Location of the Application Binaries in Oracle Solaris Cluster Data Services Planning and Administration Guide.

    Download MySQL from http://www.mysql.com. If you intend to use local disks for the MySQL software, you will need to repeat this step on all nodes within Oracle Solaris Cluster.

  5. Create a mysql-user and mysql-group for MySQL on all nodes:zones in the cluster that will run MySQL.
    1. Create an entry in /etc/group on all cluster nodes.
      # groupadd -g 1000 mysql
    2. Create an entry in /etc/passwd on all cluster nodes.

      This user should have a locked password.

      # useradd -u 1000 -g 1000 -d /global/mysql -s /bin/sh mysql 
  6. Change the owner and group for MySQL binaries.

    If MySQL binaries are on all nodes, then repeat this step on every node.

    # chown -R mysql:mysql /global/mysql
  7. Create your MySQL Database directory for your MySQL instance or instances.
    # mkdir MySQL-Database-directory 

    Note - Refer to Configuration Restrictions for a description of the MySQL Database directory and to Installing and Configuring MySQL for a list of common path names.


    The following listing shows one MySQL instance. MySQL has been installed from http://www.mysql.com in /global/mysql, which is mounted as a cluster file system. The MySQL Database Directory for the MySQL instance is /global/mysql-data.

    # cd /global/mysql
    #
    # ls -l
    -rw-r--r--   1 mysql    mysql      19106 Dec 10 14:52 COPYING
    -rw-r--r--   1 mysql    mysql      28003 Dec 10 14:52 COPYING.LIB
    -rw-r--r--   1 mysql    mysql      44577 Dec  5 10:37 ChangeLog
    -rw-r--r--   1 mysql    mysql       6811 Dec 10 14:53 INSTALL-BINARY
    -rw-r--r--   1 mysql    mysql       1976 Dec  5 10:37 README
    drwxr-xr-x   2 mysql    mysql       1024 Dec 13 18:05 bin
    -rwxr-xr-x   1 mysql    mysql        773 Dec 10 15:34 configure
    drwxr-x---   3 mysql    mysql        512 Apr  3 12:23 data
    drwxr-xr-x   2 mysql    mysql       1024 Dec 10 15:35 include
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 lib
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 man
    -rw-r--r--   1 mysql    mysql    2582089 Dec 10 14:47 manual.html
    -rw-r--r--   1 mysql    mysql    2239278 Dec 10 14:47 manual.txt
    -rw-r--r--   1 mysql    mysql      94600 Dec 10 14:47 manual_toc.html
    drwxr-xr-x   6 mysql    mysql        512 Dec 10 15:35 mysql-test
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 scripts
    drwxr-xr-x   3 mysql    mysql        512 Dec 10 15:35 share
    drwxr-xr-x   7 mysql    mysql       1024 Dec 10 15:35 sql-bench
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 support-files
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 tests
    #
  8. Create the MySQL my.cnf file according to your requirements.

    The HA for MySQL data service provides three sample my.cnf files for MySQL. One sample configuration file is for a master configuration, one is sample file is for a slave configuration, and one for the server configuration in a MySQL cluster.

    The contents of /opt/SUNWscmys/etc/my.cnf_sample_[master|slave|mysqld_cluster]provide a sample MySQL configuration file that you can use to create your MySQL instance MySQL-Database-directory/my.cnf. You must still edit that file to reflect your configuration values.

    # cp /opt/SUNWscmys/etc/my.cnf_sample_master  \
     MySQL-Database-directory/my.cnf  

    Note - For a multiple-master operating system scalable deployment, perform the remaining step of this procedure on all zones of the cluster that are about to host the MySQL database. In this case, set the socket directive in the my.cnf file to the following value:

    socket=/tmp/physical-host.sock

  9. Bootstrap MySQL instance.

    This creates the privilege tables db, host, user, tables_priv and columns_priv in the MySQL database, as well as the func table.

    # cd MySQL-base-directory
    # ./scripts/mysql_install_db  \
    --datadir=MySQL-Database-directory
  10. Create a logfile directory in MySQL-Database-Directory
    # mkdir MySQL-Database-Directory/logs  
  11. Create directories for your storage engines.
    # mkdir MySQL-Database-Directory/innodb
    # mkdir MySQL-Database-Directory/BDB
  12. Change the owner and group for MySQL—Database-Directory.
    # chown -R mysql:mysql MySQL-Database-Directory
  13. Change file permission for MySQL-Database-Directory/my.cnf.
    # chmod 644 MySQL-Database-Directory/my.cnf

How to Enable MySQL to run in an HA Container Configuration

  1. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on one of the nodes in the cluster that will host MySQL.
  2. As superuser register the SUNW.HAStoragePlus and the SUNW.gds resource types.
    # clresourcetype register SUNW.HAStoragePlus SUNW.gds
  3. Create a failover resource group.
    # clresourcegroup create MySQL-resource-group
  4. Create a resource for the MySQL zone`s disk storage.
    # clresource create -t SUNW.HAStoragePlus \
    -p FileSystemMountPoints=MySQL-instance-mount-points \
    MySQL-has-resource
  5. (Optional) If you want the protection against a total adapter failure for your public network, create a resource for the MySQL`s logical hostname.
    # clreslogicalhostname create -g MySQL-resource-group \
    -h logical-hostname \
    MySQL-logical-hostname-resource-name
  6. Place the resource group in the managed state.
    # clresourcegroup online -M  MySQL-resource-group
  7. Install the zone.

    Install the zone according to the Oracle Solaris Cluster HA for Solaris Containers agent documentation, assuming that the resource name is MySQL-zone-rs and that the zone name is MySQL-zone.

  8. Verify the zone's installation.
    # zoneadm -z MySQL-zone boot
    # zoneadm -z MySQL-zone halt
  9. Register the zone's boot component.
    1. Copy the container resource boot component configuration file.
      # cp /opt/SUNWsczone/sczbt/util/sczbt_config zones-target-configuration-file
    2. In the configuration file, set the following variables:
      RS=MySQL-zone-rs
      RG=MySQL-resource-group
      PARAMETERDIR=MySQL-zone-parameter-directory
      SC_NETWORK=true|false
      SC_LH=MySQL-logical-hostname-resource-name
      FAILOVER=true|false
      HAS_RS=MySQL-has-resource
      Zonename=MySQL-zone
      Zonebootopt=zone-boot-options
      Milestone=zone-boot-milestone
      Mounts=
    3. Create the parameter directory for your zone's resource.
      # mkdir MySQL-zone-parameter-directory
    4. Execute the Oracle Solaris Cluster HA for Solaris Container registration script.
      # /opt/SUNWsczone/sczbt/util/sczbt_register -f zone's-target-configuration-file
    5. Enable the Solaris Container resource.
      # clresource enable MySQL-zone-rs
  10. Enable the resource group.
    # clresourcegroup online  MySQL-resource-group

How to Install and Configure MySQL in an HA Container

Before You Begin

If the HA for MySQL package (SUNWscmys) was not installed during your initial Oracle Solaris Cluster installation, proceed to Installing the HA for MySQL Packages to install it on your cluster. Return here to continue the Installation and Configuration of MySQL.

  1. Ensure that you are on the node where you have enabled your resource group.
  2. Log in to your zone
    # zlogin MySQL-zone
  3. Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on one of the nodes in the cluster that will host MySQL.
  4. Install MySQL.

    MySQL should be installed onto a cluster file system. For a discussion of the advantages and disadvantages of installing the software on local versus cluster file systems, see Determining the Location of the Application Binaries in Oracle Solaris Cluster Data Services Planning and Administration Guide.

    Download MySQL from http://www.mysql.com. If you intend to use local disks for the MySQL software, you will need to repeat this step on all cluster nodes.

  5. Create a mysql-user and mysql-group for the MySQL zone that will run MySQL.
    1. Create an entry in /etc/group in the zone.
      # groupadd -g 1000 mysql
    2. Create an entry in /etc/passwd on all cluster nodes.

      This user should have a locked password.

      # useradd -u 1000 -g 1000 -d /global/mysql -s /bin/sh mysql 
  6. Change the owner and group for MySQL binaries.
    # chown -R mysql:mysql /global/mysql
  7. Create your MySQL Database directory for your MySQL instance or instances.
    # mkdir MySQL-Database-directory

    Note - Refer to the Configuration Restrictions section for a description of the MySQL Database directory and to Installing and Configuring MySQL for a list of common path names.


    The following listing shows one MySQL instance. MySQL has been installed from http://www.mysql.com in /global/mysql, which is mounted as a cluster file system. The MySQL Database Directory for the MySQL instance is /global/mysql-data.

    # cd /global/mysql
    #
    # ls -l
    -rw-r--r--   1 mysql    mysql      19106 Dec 10 14:52 COPYING
    -rw-r--r--   1 mysql    mysql      28003 Dec 10 14:52 COPYING.LIB
    -rw-r--r--   1 mysql    mysql      44577 Dec  5 10:37 ChangeLog
    -rw-r--r--   1 mysql    mysql       6811 Dec 10 14:53 INSTALL-BINARY
    -rw-r--r--   1 mysql    mysql       1976 Dec  5 10:37 README
    drwxr-xr-x   2 mysql    mysql       1024 Dec 13 18:05 bin
    -rwxr-xr-x   1 mysql    mysql        773 Dec 10 15:34 configure
    drwxr-x---   3 mysql    mysql        512 Apr  3 12:23 data
    drwxr-xr-x   2 mysql    mysql       1024 Dec 10 15:35 include
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 lib
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 man
    -rw-r--r--   1 mysql    mysql    2582089 Dec 10 14:47 manual.html
    -rw-r--r--   1 mysql    mysql    2239278 Dec 10 14:47 manual.txt
    -rw-r--r--   1 mysql    mysql      94600 Dec 10 14:47 manual_toc.html
    drwxr-xr-x   6 mysql    mysql        512 Dec 10 15:35 mysql-test
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 scripts
    drwxr-xr-x   3 mysql    mysql        512 Dec 10 15:35 share
    drwxr-xr-x   7 mysql    mysql       1024 Dec 10 15:35 sql-bench
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 support-files
    drwxr-xr-x   2 mysql    mysql        512 Dec 10 15:35 tests
    #
  8. Create the MySQL my.cnf file.

    The HA for MySQL data service provides three sample my.cnf files for MySQL. One sample configuration file is for a master configuration, one sample file is for a slave configuration, and one is for the server configuration in a MySQL cluster.

    The contents of /opt/SUNWscmys/etc/my.cnf_sample_[master|slave|mysqld_cluster]provides a sample MySQL configuration file that you can use to create your MySQL instance MySQL-Database-directory/my.cnf. You must still edit that file to reflect your configuration values.

    # cp /opt/SUNWscmys/etc/my.cnf_sample_master  \
     MySQL-Database-directory/my.cnf  
  9. Bootstrap the MySQL instance.

    This creates the privilege tables db, host, user, tables_priv and columns_priv in the MySQL database, as well as the func table.

    # cd <MySQL-Base-director
    # ./scripts/mysql_install_db  \
    --datadir=MySQL-Database-directory
  10. Create a log file directory in MySQL-Database-Directory.
    # mkdir MySQL-Database-Directory/logs  
  11. Create directories for your storage engines.
    # mkdir MySQL-Database-Directory/innodb
    # mkdir MySQL-Database-Directory/BDB
  12. Change owner and group for MySQL-Database-Directory.
    # chown -R mysql:mysql MySQL-Database-Directory
  13. Change file permission for MySQL-Database-Directory/my.cnf.
    # chmod 644 MySQL-Database-Directory/my.cnf