Master-Master SQL DB on same VPS

February 22, 2019 301 views
MySQL WordPress Ubuntu 18.04

Hello
We want two MySQL databases be synchronized as Master-Master when they are both on the same VPS.
We are using Plesk on Ubunto 18.04, and have two Wordpress sites...
I found this article: https://www.digitalocean.com/community/tutorials/how-to-configure-mysql-group-replication-on-ubuntu-16-04
But it is for different servers.
We can accept a solution that uses a third party service or plugin if it is not possible in a similar way like in the mentioned article.
We do not want a multisite installation and it must be on different installations.
Thank you in advance.

3 comments
  • As I read around, no one advises to use this setup to synchronize WP databases. I believe there should be a way to solve this. If I get an answer I will post it here.

  • Hey friend,

    I think it might expose more solutions if we dive down into the goal and reasoning. What would the purpose be of running two MySQL instances in master-master replication on the same server?

    Jarland

  • Hello, Jerald
    In fact, while answering your question I discovered that using Multisite installation with different domains answers the questions. My concerns were mostly related to security and allowing separate administration for each installation. Overall, doing all that with Multi domain installation is much more convenient that the solution I was seeking.
    The idea is to have:

    • User accounts synchronized.
    • Certain plugin tables data to be synchronized in real time. The concerned plugins are Network aware and therefor this is done with their built-in capabilities.

    I appreciate your note, and I hope this will help others.
    Wordpress now supports multi-domains as a core feature without the need to use a plugin.
    And, it is a chance to express that if you use Cloudflare DNS then the Cloudflare SSL plugin is a must have to solve the issue of infinite redirection.
    Thanks again. . .
    Shadi

1 Answer

This question was answered by @Cryptoshade:

Hello, Jerald
In fact, while answering your question I discovered that using Multisite installation with different domains answers the questions. My concerns were mostly related to security and allowing separate administration for each installation. Overall, doing all that with Multi domain installation is much more convenient that the solution I was seeking.
The idea is to have:

  • User accounts synchronized.
  • Certain plugin tables data to be synchronized in real time. The concerned plugins are Network aware and therefor this is done with their built-in capabilities.

I appreciate your note, and I hope this will help others.
Wordpress now supports multi-domains as a core feature without the need to use a plugin.
And, it is a chance to express that if you use Cloudflare DNS then the Cloudflare SSL plugin is a must have to solve the issue of infinite redirection.
Thanks again. . .
Shadi

View the original comment

Have another answer? Share your knowledge.