Sun Cluster Data Service for MySQL Guide for Solaris OS

ProcedureExample: Installing the MySQL Software on Local Storage

These steps illustrate how to install the MySQL software in the default directory /usr/local/mysql. As long as only one node is mentioned it needs to be the node where your resource group is online. It is assumed, that you inherited /usr, so you can not 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
    phys-schost-2# 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-architcture_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
    phys-schost-2# zlogin clu1
    
  5. Add the mysql group and user.


    zone-1# groupadd -g 1000 mysql
    zone-1# groupadd -g 1000 mysql
    zone-2# useradd -g 1000 -d /global/mnt3/mysql -m -s /bin/ksh mysql
    zone-2# useradd -g 1000 -d /global/mnt3/mysql -m -s /bin/ksh mysql
    
  6. Leave the zone.