Start the MySQL database manually on the node where the resource group is online.
phys-schost-1# cd /usr/local/mysql phys-schost-1# ./bin/mysqld --defaults-file=/global/mnt3/mysql-data/my.cnf \ --basedir=/usr/local/mysql --datadir=/global/mnt3/mysql-data \ --pid-file=/global/mnt3/mysql-data/mysqld.pid \ --user=mysql >> /global/mnt3/mysql-data/logs/ha-host-1.log 2>&1 & |
Set the password for localhost in MySQL to root.
phys-schost-1# /usr/local/mysql/bin/mysqladmin -S /tmp/ha-host-1.sock -uroot \ password 'root' |
Add an admin user in the MySQL database for the logical host.
phys-schost-1# /usr/local/mysql/bin/mysql -S /tmp/ha-host-1.sock -uroot -proot mysql> use mysql; mysql> GRANT ALL ON *.* TO 'root'@'phys-schost-1' IDENTIFIED BY 'root'; mysql> GRANT ALL ON *.* TO 'root'@'phys-schost-2' IDENTIFIED BY 'root'; mysql> UPDATE user SET Grant_priv='Y' WHERE User='root' AND Host='phys-schost-1'; mysql> UPDATE user SET Grant_priv='Y' WHERE User='root' AND Host='phys-schost-2'; mysql> exit |
Prepare the Sun Cluster specific test database.
phys-schost-1# ksh /opt/SUNWscmys/util/mysql_register -f /global/mnt3/mysql_config |
Stop the MySQL database.
phys-schost-1# kill -TERM `cat /global/mnt3/mysql-data/mysqld.pid` |
Run the ha_mysql_register script to register the resource.
phys-schost-1# ksh /opt/SUNWscmys/util/ha_mysql_register \ -f /global/mnt3/ha_mysql_config |
Enable the resource.
phys-schost-1# clresource enable RS-MYS |