Cluster? The mysql cluster you are talking about is the integration of mysql server and NDB storage engine. Generally, if a certain service area fails, other servers will take over, so there is no single point of failure. Let me tell you the uses of these nodes:
Management node: manages other nodes of mysql cluster and plays a configuration role.
Data node: that is the one that saves data
mysql node: used to access the data node that saves data, which is the entrance to data query
So you only need to execute the command on the SQL node and confirm that the db is on this server:
$link = new mysqli('192.168.72.158','root',' root_password','db');
Thanks for the invitation!
Cluster? The mysql cluster you are talking about is the integration of mysql server and NDB storage engine. Generally, if a certain service area fails, other servers will take over, so there is no single point of failure. Let me tell you the uses of these nodes:
Management node: manages other nodes of mysql cluster and plays a configuration role.
Data node: that is the one that saves data
mysql node: used to access the data node that saves data, which is the entrance to data query
So you only need to execute the command on the SQL node and confirm that the db is on this server: