In a production deployment, the instances in which you use run-on separate machines, therefore each machine must have a unique hostname and be able to resolve the hostnames of the other machines, which run server instances. If this is not the case, you can:
Configure each machine to map the IP of each other machine to a hostname. See your operating system documentation for details. This configuration is the recommended solution.
Set up a Domain Name System (DNS) service.
Configure the
report_host
variable in the MySQL configuration of each instance to a suitable externally reachable address.
AdminAPI supports using IP addresses instead of host names and supports IPv6 addresses if the target MySQL Server version is higher than 8.0.13.
If all cluster instances are running 8.0.14 or higher, you can
use an IPv6 address or a hostname that resolves to an IPv6
address in connection strings and with options such as
localAddress
and
ipAllowlist
. For more information on using
IPv6, see Support For IPv6 And For Mixed IPv6 And IPv4 Groups.
Previous versions support IPv4 addresses only.
To verify whether the hostname of a MySQL server you have correctly configured, process the following query. This query shows how the instance reports its address to other servers and try to connect to that MySQL server from other hosts using the returned address:
SELECT coalesce(@@report_host, @@hostname);