multiple mysql databases

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

multiple mysql databases

Post by GeXus »

Does anyone have any suggestions as to the best way for handling multiple databases with php? I know some people do mirroring or clustering.. but i really am not too familiar with using more than one database. Any input would be great.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I think all you need to do is create a connection to each database and off you go. I do this fairly often. Having a connection object obviously makes this a lot simpler because the code does not have to care which connection it is using.
(#10850)
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Post by GeXus »

How would that balance the load though? Wouldnt that mean that I would be writing to both databases simultaneously?
Post Reply