0

We are planning to setup 2 mysql servers in master-master replication

Is it possible to use direct Ethernet connection over gigabit ethernet port on the 2 servers?

Is there a way to bind mysql server(or any other process) to bind to a ethernet link i.e. eth1, so that it does not accidentally uses the default link which might be connected to overloaded router?

Thanks

1 Answer 1

0

Looks like you can only bind MySQL to 0, 1 or all interfaces on a system (MySQL: Bind to more than one IP address?)

You could try having MySQL bind to all interfaces on your server, configure a private IP space for the two directly connected NICs and configure MySQL to replicate using those private IP addresses.

Example:

Server 1 (Master):

NIC1 - 192.168.0.10 <- General access to server (connected to switch)

NIC2 - 10.0.0.10 <- Replication interface (directly connected to NIC2 on Server 2)

Server 2 (Secondary):

NIC1 - 192.168.0.11 <- General access to server (connected to switch)

NIC2 - 10.0.0.11 <- Replication interface (directly connected to NIC2 on Server 1)

Configure replication using the 10.0.0.x IP addresses and see if it works.

You can verify replication is occuring over the replication interfaces by using tcpdump to capture packets or checking the interface statistics for NIC2 using ifconfig.

2
  • 1
    This should work. We have a setup similar to this one. If the dedicated replication interfaces are on a different subnet than the default link, it will route it through the correct interface anyway since it is directly connected.
    – jam
    Mar 20, 2015 at 15:04
  • Thanks I will try it on virtual box, since it can have to ethernet connections Mar 22, 2015 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.