1. Installing and Configuring HA for MySQL
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
Installing and Configuring MySQL on Local Storage in the Global Zone
Example: How to Prepare the Cluster for MySQL
Example: How to Configure MySQL in a Scalable Resource Group
Example: How to Configure MySQL in a Multiple--Master Resource Group
Example: How to Install and Bootstrap the MySQL Software on Local Storage
phys-schost-1# cd /usr/local/mysql phys-schost-1# ./bin/mysqld --defaults-file=/local/mysql-data/my.cnf \ --basedir=/usr/local/mysql --datadir=/local/mysql-data \ --pid-file=/local/mysql-data/mysqld.pid \ --user=mysql >> /local/mysql-data/logs/phys-schost-1.log 2>&1
Note - Make sure to change phys-schost-1 to phys-schost-2 on the second node.
phys-schost-1# /usr/local/mysql/bin/mysqladmin -S /tmp/phys-schost-1.sock -uroot \ password 'root'
Note - Make sure to change phys-schost-1 to phys-schost-2 on the second node.
phys-schost-1# /usr/local/mysql/bin/mysql -S /tmp/phys-schost-1.sock -uroot -proot mysql> use mysql; mysql> GRANT ALL ON *.* TO 'root'@'phys-schost-1' IDENTIFIED BY 'root'; mysql> UPDATE user SET Grant_priv='Y' WHERE User='root' AND Host='phys-schost-1'; mysql> exit
Note - Make sure to change phys-schost-1 to phys-schost-2 on the second node.
phys-schost-1# ksh /opt/SUNWscmys/util/mysql_register -f /local/mysql_config
phys-schost-1# kill -TERM 'cat /local/mysql-data/mysqld.pid'
phys-schost-1# ksh /opt/SUNWscmys/util/ha_mysql_register \ -f /local/ha_mysql_config
phys-schost-1# clresource enable RS-MYSQL