Documentation Home
MySQL Shell 8.0
Related Documentation Download this Manual
PDF (US Ltr) - 2.1Mb
PDF (A4) - 2.1Mb


MySQL Shell 8.0  /  ...  /  Configuring InnoDB Cluster Ports

7.4.5 Configuring InnoDB Cluster Ports

Instances that belong to a cluster use different ports for different types of communication. If you are using the XCOM communication stack, in addition to the default port at 3306, which is used for client connections over classic MySQL protocol, and the mysqlx_port, which defaults to 33060 and is used for X Protocol client connections, there is also a port for internal connections between the instances in the cluster which is not used for client connections. This port is configured by the localAddress option, which configures the group_replication_local_address system variable, and this port must be open so that the instances in the cluster can communicate with each other. For example, if your firewall is blocking this port then the instances cannot communicate with each other, and the cluster cannot function. Similarly, if your instances are using SELinux, you need to ensure that all of the required ports used by InnoDB Cluster are open so that the instances can communicate with each other. See Setting the TCP Port Context for MySQL Features and MySQL Shell Ports.

When you create a cluster or add instances to a cluster, by default the localAddress port is calculated by multiplying the target instance's port value by 10 and then adding one to the result. For example, when the port of the target instance is the default value of 3306, the calculated localAddress port is 33061. You should ensure that port numbers used by your cluster instances are compatible with the way localAddress is calculated. For example, if the server instance being used to create a cluster has a port number higher than 6553, the dba.createCluster() operation fails because the calculated localAddress port number exceeds the maximum valid port which is 65535. To avoid this situation either use a lower port value on the instances you use for InnoDB Cluster, or manually assign the localAddress value, for example:

mysql-js> dba.createCluster('testCluster', {'localAddress':'icadmin@ic-1:33061'}

If you are using the MYSQL communication stack, the localAddress value is generated automatically using the same network address as the MySQL server. An extra internal port/address is not required. See Section 7.5.9, “Configuring the Group Replication Communication Stack”.

localAddress can be defined manually, but the port used must be one MySQL is listening on, as defined by bind_address.