Search code examples
phpmysqlreplicationdatabase-replication

mysqlnd_ms alternative for php7


I am upgrading my web servers PHP version from 5.5 to 7.1 in Debian 8 machine.

The issue is that mysqlnd_ms is not available for PHP7.

As far as I understand, there should be another way to configure my server to add connections to MySQL master and MySQL slave servers.

Maybe you could point me to a tutorial?

I would like to point out that I am configuring a webserver, not a mysql server. I need to configure mysql client in order to allow php to connect to master or slave mysql servers.

Thank you.


Solution

  • I am the developer of the mysqlnd_ms php 7 port at https://github.com/sergiotabanelli/mysqlnd_ms.
    We successfully use it in our production enviroment. It passed above 500 tests from the original version.

    Documentation is still not complete but the quickstart and examples section is ready, it is slightly different from original one except for the global transaction IDs injection and session consistency sections which have been copletely rewritten.

    Furthermore the new extension has cool new functionalities especially for read and write consistency enforcing in recent MySQL single and multi master asyncronous clusters.

    Read consistency transparently manage replication lag issues and provide flexible read "your" writes policies that allow application users to always read them writes also on distinct connections and also if distributed on distinct php application servers.

    Write consistency transparently manage write conflicts in multi-master asyncronous clusters.

    Read and write consistency allows transparent migration to MySQL single and multi master asyncronous clusters in almost all use cases with no or at most extremely small effort and application changes.

    In our enviroment we have above 100 small distinct intranet applications that we recently migrate from standalone MySQL instances to multi-master MySQL Group replication clusters without any code changes. For an introduction to read and write consistency enforcing check my gist at https://gist.github.com/sergiotabanelli/ce992b630d08a0bc7a9cec7c577638f5.