MySQL Forums
Forum List  »  Utilities

How to configure multiple instances on 2 hosts?
Posted by: Mike Schleif
Date: October 24, 2012 08:11AM

Hi!

I need help configuring MySQL for special datadir and multiple mysqld instances on same host.

My client has very high PCI DSS security concerns. We are building 2 secure CentOS hosts with MySQL databases.

A is the primary host.

B is secondary.

Both have special LUKS encrypted filesystems for the actual databases.

A should replicate to B. B will become primary when A fails.

We also want B to replicate to another MySQL on another encrypted filesystem. We think that we can break replication on "C" for backup purposes, then resync afterward. One of our questions is: on which host should this 3rd database reside?

More to the point, however, is configuring MySQL for "special" datadir. The default MySQL RPM for CentOs is: mysql.x86_64 5.1.61-4.el6

Apparently, it "prefers" that datadir reside here: /var/lib/mysql

By doing this:
mysql_install_db --user=mysql --ldata=/opt/mysql01

I can then get it running by doing this:
mysqld_safe --datadir=/opt/mysql01 --user=mysql

However, /etc/rc.d/init.d/mysqld start FAILS every time

I prefer to use a fully functional init script for this, because somebody has already thought through error handling.

Please, hit me with the clue stick and guide me to best practices for this setup.

Thank you

~Mike

Options: ReplyQuote


Subject
Views
Written By
Posted
How to configure multiple instances on 2 hosts?
2079
October 24, 2012 08:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.