Bug #102356 python mysql.connector with IPv6 only system
Submitted: 24 Jan 0:36
Reporter: Robert Cray Email Updates:
Status: Open Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:7.1 OS:Ubuntu
Assigned to: CPU Architecture:Any
Tags: ipv6

[24 Jan 0:36] Robert Cray
Description:
When making a connection using the python mysql.connector on an IPv6 only system to an IPv4 only database.

The IPv6 client is using DNS64/NAT64 to reach the IPv4 only server

The connection fails unless force_ipv6=True is set.  This is the incorrect behavior.

In a DNS64/NAT64 scenario, the DNS server will create a synthesized "AAAA" record iff an "A" record exists but a "AAAA" does not.  In this scenario the API queries for both "A" and "AAAA" record - the "A" record will not be reachable.

Pre-existing code will typically not have force_ipv6=True (it will be left as default).

How to repeat:
Connect on IPV6 only client to IPv4 only server using DNS64/NAT64

Suggested fix:
If an "AAAA" record is available, it should always be used.