Solaris Sun Cluster – Changing Fault Monitor Password (fmuser) for MySQL

Solaris Sun Cluster – Changing Fault Monitor Password (fmuser) for MySQL

There was a requirement to change the fmuser password after the Sun Cluster for MySQL was implemented. The customer wanted to change the default password to something else. The fmuser is the default user for the Sun Cluster Fault Monitor to interact with the MySQL database.

Step 1: Check the cluster status.

# /usr/cluster/bin/clresource status
=== Cluster Resources ===

Resource Name Node Name State Status Message
------------- --------- ----- --------------
mysql-rg       node1           Online Online 
               node2           Offline Offline

mysql-lh-res node1 Offline Offline - LogicalHostname offline.
             node2 Online Online - LogicalHostname online.

mysql-stor-res node1 Offline Offline
               node2 Online Online

Step 2: Stop fault monitoring on mysql-rg resource (Note: The resource, not the resource group!)

# /usr/cluster/bin/clresource unmonitor mysql-rg
# /usr/cluster/bin/clresource status

=== Cluster Resources ===

Resource Name Node Name State Status Message
------------- --------- ----- --------------
mysql-rg node1 Online_not_monitored Online_not_monitored
 node2 Offline Offline

mysql-lh-res node1 Online Online - LogicalHostname online.
 node2 Offline Offline

mysql-stor-res node1 Online Online
 node2 Offline Offline

Step 3: Change the fmuser password in the MySQL database

/appl/bin/mysql -uroot -ppassword -S '/tmp/vnode.sock'

mysql> set password for 'fmuser'@'node1' = PASSWORD('newpassword');
Query OK, 0 rows affected (0.00 sec)

mysql> set password for 'fmuser'@'node2' = PASSWORD('newpassword');
Query OK, 0 rows affected (0.00 sec)

Step 4: Disable the mysql-rg resource and change the properties of it. We will need to change 4 properties of it. (Validate, Stop, Probe and Start)

# /usr/cluster/bin/clresource disable mysql-rg

./scrgadm -c -j mysql-rg -x Validate_command="/opt/SUNWscmys/bin/control_mysql -R mysql-rg -G mysql-rg -B /appl -D /data -U mysql -H vnode -F fmuser%newpassword -L /logs -C validate"
./scrgadm -c -j mysql-rg -x Stop_command="/opt/SUNWscmys/bin/stop_mysql -R mysql-rg -G mysql-rg -B /appl -D /data -U mysql -H vnode -F fmuser%newpassword -L /logs -C"
./scrgadm -c -j mysql-rg -x Probe_command="/opt/SUNWscmys/bin/probe_mysql -R mysql-rg -G mysql-rg -B /appl -D /data -U mysql -H vnode -F fmuser%newpassword -L /logs -C"
./scrgadm -c -j mysql-rg -x Start_command="/opt/SUNWscmys/bin/start_mysql -R mysql-rg -G mysql-rg -B /appl -D /data -U mysql -H vnode -F fmuser%newpassword -L /logs -C"

Step 5: Enable the mysql-rg resource and start back fault monitoring on the mysql resource.

#/usr/cluster/bin/clresource enable mysql-rg
#/usr/cluster/bin/clresource monitor mysql-rg

Please note that the above steps will result downtime. That’s all!

Regards,
Wei Shan

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: