Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Splitting MySQL Database

OneTwoOneTwo Member
edited March 2012 in General

in a big site, like ragezone or big warez forums, wouldn't it be a good idea to move some tables to a second mysql server, so the load balances to these two servers?

Comments

  • No.

    You don't want to know what happens when you use PHP and connect to two MySQL servers.

  • Do i want to know it?

  • I want to know.

  • PHP gets confused.

  • @Daniel said: PHP gets confused.

    elaborate?

    you can connect to two databases at the same time and get some info from the first one and some other from the second.

  • AmfyAmfy Member
    edited March 2012

    I think it brings more performance to cache database-entries with memcached, than to split infos in more databases. To split things in more than one database only makes sence, when you have an extreme high amount of tables (like very large wordpress-mu-installations like wordpress.com)

    Why is one of your examples a warez board? :P

  • @OneTwo said: you can connect to two databases at the same time and get some info from the first one and some other from the second.

    Except PHP will get confused and start issuing wrong SQL's to the wrong database.

  • Some time ago I used MySQL_Proxy to direct write query to the master and read to slaves, lately you can use circular replication...

    Thanked by 2yomero Miky
  • raindog308raindog308 Administrator, Veteran

    @Daniel said: Except PHP will get confused and start issuing wrong SQL's to the wrong database.

    I have never seen this happen. You open two different database handles. Queries to each go to the respective databases.

    You have to remember which is which in your code, but that's not a real challenge.

    Do you have more info on PHP getting confused and issuing wrong SQLs to the wrong database?

    @OneTwo said: in a big site, like ragezone or big warez forums, wouldn't it be a good idea to move some tables to a second mysql server, so the load balances to these two servers?

    Have you spent some time tuning the MySQL DB you have now?

  • @prometeus said: Some time ago I used MySQL_Proxy to direct write query to the master and read to slaves, lately you can use circular replication...

    OMFG, you are the man

Sign In or Register to comment.