Description:
When running under an IPv6 only environment, replication client does not initiate a connection to the master server. Error log indicates "error connecting to master" Error_code: 2005 I have tried setting master_host using a hostname, and IPv6 address both with and without square brackets. The command line mysql client can connect to the replication master successfully. The server is bound to :: and will respond to IPv6 connections from other hosts, including the master server (when running command line client).
How to repeat:
Configure two hosts with only IPv6 addresses and install mysql server.
Set bind_address to :: to ensure listening on IPv6
Configure binary logging on the master server
Configure replication on the slave server, using a valid DNS name (dns or hosts file).
Start slave
Observe timeout connecting to master
Perform packet capture on either server and observe that there is no connection initiated on the slave server.
As a control: use the mysql client on the slave server to connect to the master server and verify that it is listening on IPv6.
Suggested fix:
Review slave I/O code for the mechanism used to create connections to the master and ensure that it will resolve IPv6 host names or literal IP addresses. In the case of literal addresses, add the correct format (brackets required?) to the documentation.