I know how to setup a master->slave replication but I am a bit confused on how I would do read/write splitting between the two MySQL servers with a PHP application.
When I have MySQL replication working and PHP connects to the master, does it read and write from just the master only or both master and slave? If not, how would I achieve this (via PHP/MySQL) or some other means?
I had always thought that MySQL replication had some built-in functionality that reads data from the slave for a bit of load-balancing to occur but now I think MySQL replication is just to copy data over to a slave for fail-over purposes only. I would like to achieve load-balancing but I still do not know exactly how MySQL replication works as far as reading data from slaves and writing data to master.