1. Home
  2. Configuring
  3. How do I replicate additional non-Bright databases?

How do I replicate additional non-Bright databases?

This article is being updated. Please be aware the content herein, not limited to version numbers and slight syntax changes, may not match the output from the most recent versions of Bright. This notation will be removed when the content has been updated.

Sometimes the cluster administrator may arrange for more databases to be configured for a non-Bright application. These are independent of Bright control, but just happen to use MySQL running on the head node, like Bright does.

The administrator would typically like to have database replication for these additional databases too.

Automatic replication of additional databases can be carried out in Bright 7.0 as follows:

Edit /cm/local/apps/cluster-tools/ha/conf/extradbclone.xml and add the additional databases in tags as follows:
[...]
<dbclone>
<db name="testDB" username="test" userpass="Ch@ngeMe" />
<db name="testDB2" username="test" userpass="Ch@ngeMe" />
</dbclone>
[...]

Run the “/cm/local/apps/cmd/scripts/cm-update-mycnf” script on both head nodes.

Create the database directories on the secondary head node:
# mkdir /var/lib/mysql/testDB
# mkdir /var/lib/mysql/testDB2
# chown -R mysql:mysql /var/lib/mysql/testDB
# chown -R mysql:mysql /var/lib/mysql/testDB2

Restart MySQL service on both head nodes:
# service mysqld restart\

Run cmha dbreclone <passive> to clone the additional databases
# cmha dbreclone <passive>

Updated on August 25, 2020

Was this article helpful?

Related Articles

Leave a Comment