Skip to main content
Ask Question
Configuring
Asked a question recently

How do I replicate additional non-Bright databases?

Where am I?

In Bright Computing, Inc. you can ask and answer questions and share your experience with others!

 How do I replicate additional non-Bright databases?

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>