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 &
phys-schost-1# /usr/local/mysql/bin/mysqladmin -S /tmp/ha-host-1.sock -uroot \ password 'root'
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
phys-schost-1# ksh /opt/SUNWscmys/util/mysql_register \ -f /global/mnt3/mysql_config
You set it to root in Step 3.
phys-schost-1# kill -TERM $(cat /global/mnt3/mysql-data/mysqld.pid)
phys-schost-1# clpstring create -t resource -b RS-MYS RS-MYS
Enter the same password you provided in Step 4 when you are prompted for the fault monitoring user password.
phys-schost-1# clresource create -d -g RG-MYS \ -t ORCL.mysql \ -p Mysql_basedir=/usr/local/mysql \ -p Mysql_datadir=/global/mnt3/mysql-data \ -p Mysql_user=mysql \ -p Mysql_host=ha-host-1 \ -p Mysql_fmuser=fmuser \ -p Mysql_logdir=/global/mnt3/mysql-data/logs \ -p Resource_dependencies=RS-MYS-HAS,ha-host-1 \ RS-MYS