Mysql cluster connection with php

I have created Innodb cluster environment of mysql Ver 8.0.21 on Linux x86_64 LTS with 1 Read / Write, 2 read only nodes and mysql router for load balancing and performance. Read / Write ports are 6446 and read only ports are 6447. Databases and cluster management is ok through putty from mysql router. Problem is that what will be the connection string in database.php file of PHP 7.0.33. How to define php database connection for mysql router for load balancing or is there any other way to use the cluster environment with php 7.0.33. I am unable to find any stuff on internet.

I am not 100% sure, but, there is a lot of info on’s site. I looked around and everyone seems to say you can use this:
Just need to use the IP and PORT. And, username and password of course. Since most WAMP’s use root and no password, that is what I am showing. Good luck!

Sponsor our Newsletter | Privacy Policy | Terms of Service