PHP: mysqlnd_ms don't replicate

212 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.