I have configured master slave on my system (MYSQL). Now, is there is any script or way available or possible to transfer all read request to SLAVE.
So, let me make my question here more clear. I have a application written in JAVA-SPRING and use Bone-CP to connect to Mysql db. So, now I have to implement Master-Slave where all write request goes to MASTER and all read request goes to SLAVE via Master or directly. I don't want to make any changes in code, so I am looking for some solution which I could implement on MYSQL to transfer all read/Select request to Slave.
I have googled around but no solution or hint found.
There might be two possible solution for it. 1. All request first hit MASTER and then master transfer all request to SLAVE. 2. A layer between APPLICATION and MYSQL which decides where to transfer the request accordingly
But I have no idea how to implement it, So can anyone provide any link, hint or solution to my problem.