0

For my current environment, I am running 2 separate Linux boxes each running MySQL. Each server should have the exact same db (one of the servers should host the db and the other one points to it). I know this could be possible using "federated tables" but the application that the database supports has hundreds of tables. It would be very recursive to point each table to the other db.

Does anyone have any suggestions how this could be possible? I have looked all over and have not found anything quite like this scenario.

BASSJelly
  • 1
  • 1
  • I think that it could be useful https://stackoverflow.com/questions/12426320/how-do-i-set-the-default-schema-for-a-user-in-mysql – Juan Caicedo Aug 21 '18 at 18:30
  • For my environment each DB is on a completely different server. The link you have provided uses the same server, just a different db. – BASSJelly Aug 21 '18 at 18:58
  • I don't know what you mean by "primary database" or "point to" the primary database. Maybe replication is what you need? – Bill Karwin Aug 21 '18 at 19:03
  • 1
    I do recommend you do NOT use federated tables. Those have a very specific use case: heavy INSERT load, too much for disks on a single server circa 2004 to keep up with. Today we just buy fast solid-state storage, and/or split the INSERT load over many MySQL instances. – Bill Karwin Aug 21 '18 at 19:06
  • Sorry if I worded it confusing. What I am trying to do is have one of the machines host the MySQL db and the other server just points to that db. So they are both running on the SAME db but on 2 different servers. – BASSJelly Aug 21 '18 at 19:11
  • Than it sounds even more like replication. Have you read the reference manual: https://dev.mysql.com/doc/refman/8.0/en/replication.html or just google for "mysql replication tutorial" and find lots of helpful articles. – Bill Karwin Aug 21 '18 at 20:45

0 Answers0