1

I only have a high availability group in my MySQL Fabric configuration and I would like to connect to it with PHP.

I check http://dev.mysql.com/doc/mysql-utilities/1.4/en/fabric.html for Fabric aware connector in PHP. However, I only find Java and Python Fabric aware connectors.

I also find another tutorial about sharding PHP with MySQL Fabric (http://schlueters.de/blog/index.php?url=archives/175-Sharding-PHP-with-MySQL-Fabric.html). The scenario is also about sharding, which is not I need.

Besides, I try the http://php.net/manual/en/mysqlnd-ms.quickstart.mysql_fabric.php tutorial. Sadly, it is also about PHP sharding.

Is there any tutorial about how to connect to a MySQL Fabric high availability group with PHP?

Marc Alff
  • 8,227
  • 33
  • 59
Greenhand
  • 681
  • 2
  • 9
  • 17
  • 2
    Don't you just call `mysqlnd_ms_fabric_select_global()` and run the queries on it? From the link you posted (schlueters.de) and http://blog.ulf-wendel.de/2014/the-early-mysql-fabric-sharding-support-for-php/ looks like you just SELECT GLOBAL then run the queries on it. – Eduardo Romero Aug 19 '14 at 17:19
  • As far as I know, the global group exists only when sharding is used (http://www.mysqlperformanceblog.com/2014/07/11/managing-shards-mysql-databases-mysql-fabric-2/). If there is only one high availability group in MySQL Fabric, there is no global group. I am new to MySQL Fabric. Please feel free to correct me if I am wrong. – Greenhand Aug 19 '14 at 23:09
  • Also, the "Example #1 Plugin config: Fabric hosts instead of MySQL servers" of the tutorial (http://php.net/manual/en/mysqlnd-ms.quickstart.mysql_fabric.php) is missing two accounts. One is for Fabric and the other is for MySQL. The connection to MySQL Fabric with Java is in the form: Connection conn = DriverManager.getConnection(jdbc:mysql:fabric://fabrichost:32274/database?fabricUsername=fabricUsername&fabricPassword=fabricPassword, "mysqluser", "mysqlpassword"). – Greenhand Aug 19 '14 at 23:49
  • I just noticed that in the link I posted above, Ulf says that: "Out of the two major use cases for Fabric, the PHP plugin so far covers the sharding one only" :/ – Eduardo Romero Aug 20 '14 at 00:03
  • Wow! That's too bad... – Greenhand Aug 20 '14 at 12:05
  • Hey, was anyone able to solve this ? I still cant find any documentation supporting only HA for php, fabric – Akshat Goel Oct 27 '15 at 11:16
  • It seems the feature is still under development. Take a look at the comment at http://mysqlhighavailability.com/announcing-mysql-fabric-1-6-2-on-labs/#comment-13041 – Greenhand Oct 28 '15 at 12:40

1 Answers1

1

Some Days ago i talked to someone from Oracle. I asked how to connect to Fabric when i dont want to use sharding, but high availability. He called me back 2 Days later and told me that they forgot to develop an Connector for that !!WTF!!

And we are still waiting for a connector for fabric.