Use the information in this section to understand how to upgrade to Sun Cluster 3.2 when using Sun Cluster HA for MySQL.
This procedure will not describe how to upgrade to Sun Cluster 3.2. It includes only the steps to upgrade Sun Cluster HA for MySQL to Sun Cluster 3.2.
Use this procedure to upgrade Sun Cluster HA for MySQL from Sun Cluster 3.0 to Sun Cluster 3.2.
Shut down Sun Cluster HA for MySQL resource.
# clresource disableMySQL-resource |
Upgrade the nodes to Sun Cluster 3.2 according to Sun Cluster documentation.
Start the MySQL Server manually on Sun Cluster 3.2.
#cd <MySQL Base directory> |
# ./bin/mysqld --defaults-file=<MySQL Database directory>/my.cnf \ --basedir=<MySQL Base directory>\ --datadir=<MySQL Database directory>\ --user=mysql\ --pid-file=<MySQL Database directory>/mysqld.pid & |
Access the MySQL instance from local node with the socket option.
#<MySQL Base directory> /bin/mysql -S <MySQL Socket> -uroot \ -p<Adminpassword>\ |
The following is an example for a MySQL instance.
# mysql -s /tmp/hahostix1.sock -uroot -proot mysql> |
Drop the Sun Cluster HA for MySQL test database sc3_test_database.
# mysql -s /tmp/hahostix1.sock -uroot -proot mysql> DROP DATABASE sc3_test_database; Query OK, 0 rows affected (0.03 sec) |
Delete all entries in db-table in mysql-database that contain User='<MySQL Faultmonitor user>'.
# mysql -s /tmp/hahostix1.sock -uroot -proot mysql> use mysql; Database changed mysql> DELETE FROM db WHERE User='fmuser'; Query OK, 1 row affected (0.03 sec) |
Delete all entries in user-table in mysql-database that contain User='<MySQL Faultmonitor user>'.
# mysql -s /tmp/hahostix1.sock -uroot -proot mysql> use mysql; Database changed mysql> DELETE FROM user WHERE User='fmuser'; Query OK, 1 row affected (0.03 sec) |
Add faultmonitor-user and a test-database to MySQL.
# cd /opt/SUNWscmys/util |
Copy the mysql_config to myplace and edit the mysql_config file and follow the comments within that file:
# Where is mysql installed (BASEDIR) MYSQL_BASE= # Mysql admin-user for localhost (Should be root) MYSQL_USER= # Password for mysql admin user MYSQL_PASSWD= # Configured logicalhost MYSQL_HOST= # Specify a username for a faultmonitor user FMUSER= # Pick a password for that faultmonitor user FMPASS= # Socket name for mysqld ( Should be /tmp/<Logical host>.sock ) MYSQL_SOCK= # Specify the physical hostname for the physical NIC that this logical hostname # belongs to for every node in the cluster this Resource group can be located on. # IE: The logicalhost lh1 belongs to hme1 for physical-node phys-1 and # hme3 for physical-node phys-2. The hostname for hme1 is phys-1-hme0 and # for hme3 on phys-2 it is phys-2-hme3. # IE: MYSQL_NIC_HOSTNAME="phys-1-hme0 phys-2-hme3" MYSQL_NIC_HOSTNAME= # Where are your databases installed? (location of my.cnf) MYSQL_DATADIR= |
The following is an example for a MySQL instance on Sun Cluster 3.2.
MYSQL_BASE=/global/mysql MYSQL_USER=root MYSQL_PASSWD=root MYSQL_HOST=hahostix1 FMUSER=fmuser FMPASS=fmuser MYSQL_SOCK=/tmp/hahostix1.sock MYSQL_NIC_HOSTNAME="clusterix1 clusterix2" MYSQL_DATADIR=/global/mysql-data |
After editing mysql_config, run the mysql_register script.
# ./mysql_register -f myplace/mysql_config |
Stop the MySQL Server manually.
# kill -TERM `cat <MySQL Database directory>/mysqld.pid |
Start up Sun Cluster HA for MySQL resource.
# clresource enable MySQL-resource |
Change source addresses for admin user for accessing locally a MySQL instance with a MySQL Logicalhost.
If you want to access the MySQL instance only through the socket (localhost), omit this step.
When Sun Cluster 3.0 12/01 has been used, delete the root user belonging to the logical host and add an admin user belonging to the physical host.
If the node name and the hostname for the physical interface are different, use the hostname for the physical interface.
The following is an example for a MySQL instance on Sun Cluster 3.2.
# mysql -S /tmp/hahostix1.sock -uroot mysql> use mysql; mysql> DELETE FROM user where User='root' AND Host='hahostix1'; mysql> GRANT ALL ON *.* TO 'root'@'clusterix1' IDENTIFIED BY 'rootpasswd'; mysql> GRANT ALL ON *.* TO 'root'@'clusterix2' IDENTIFIED BY 'rootpasswd'; mysql> exit; |
You have to manually add the Grant_priv to the admin users, See the MySQL Administration documentation.