You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to connect my mysql via an ipv6 address, It fails.
However the origin PyMySQL can do it after PyMySQL@b15c673 with
issues PyMySQL#118
Can you also fix it, and update the pypi?
And This is my temporary solution.
diff -Naur cymysql/connections.py cymysql-ipv6/connections.py
--- cymysql/connections.py 2017-06-10 03:51:56.000000000 -0400
+++ cymysql-ipv6/connections.py 2017-10-27 05:12:51.125249151 -0400
@@ -398,13 +398,14 @@
self.host_info = "Localhost via UNIX socket"
if DEBUG: print('connected using unix_socket')
else:
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- t = sock.gettimeout()
- sock.settimeout(self.connect_timeout)
- sock.connect((self.host, self.port))
+ sock = socket.create_connection((self.host, self.port), self.connect_timeout)
self.host_info = "socket %s:%d" % (self.host, self.port)
if DEBUG: print('connected using socket')
- sock.settimeout(t)
except socket.error as e:
sock.close()
raise OperationalError(2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e.args[0]))
The text was updated successfully, but these errors were encountered:
When I try to connect my mysql via an ipv6 address, It fails.
However the origin
PyMySQL
can do it after PyMySQL@b15c673 withissues PyMySQL#118
Can you also fix it, and update the pypi?
And This is my temporary solution.
The text was updated successfully, but these errors were encountered: