0

I have a PHP project written in Symfony that is using connection on different databases. An example is a users table on one DB and another related table on another DB.

This works well except that I am planning to move one of the two MySQL DBs to another physical MySQL server which means that the two DBs will not be on the same server any longer.

Is there a mechanism on Symfony to support this kind of setup using Doctrine and Entity Manager?

I was exploring the FEDERATED Engine on MySQL but this will work for ready only, what about the writes?

I have an example where within a form that a user can submit, there are fields from one and the other tables, hosted now on two different servers.

Milos Cuculovic
  • 19,631
  • 51
  • 159
  • 265
  • as I know, as long as you don't try joins between different mysql servers you should not any have problems. If current set up works with different connections then just updating MySQL connection setting should work – Nuryagdy Mustapayev Jul 15 '22 at 08:58
  • Hi @NuryagdyMustapayev, I am not sure I understand your comment. My current setup works with two DBs on the same MySQL server. But for architecture design decisions, I need to move on DB to another MySQL server. So I need joins between tables from different DBs on different MySQL servers. – Milos Cuculovic Jul 15 '22 at 09:11

0 Answers0