0

I installed mysqlnd_ms extension for PHP. I want to route SELECT requests to the slave and UPDATE/INSERT requests to the master (load balancing). It works well, SELECT are made on the slave and INSERT of the master but nothing is synchronized and I don't understand why.

For example if I insert an entry "something" and then I select this entry "something", it will say "something" does not exist. What am I doing wrong? Isn't mysqlnd_ms supposed to sync everything transparently?

  • I don't have experience with `mysqlnd_ms` but unless I am misinterpreting its documentation, it is meant to work with an existing MySQL master-slave replication cluster and the `mysqlnd_ms` extension doesn't enforce replication itself. Do you have master-slave replication already configured between your two database servers? http://dev.mysql.com/doc/refman/5.0/en/replication.html – Michael Berkowski Dec 20 '13 at 20:55

1 Answers1

1

THIS IS EXACTLY WHAT MYSQLND_MS DOES: SELECT are made on the slave and INSERT of the master.

The synchronization between master and slave should be done by MySQL server cluster. You should change your MySQL configuration (SERVER SIDE). Everything mysqlnd_ms does located on CLIENT SIDE.

John
  • 249
  • 3
  • 6