Quantcast
Channel: MySQL Forums - Connector/Python
Viewing all articles
Browse latest Browse all 384

Propose improvements to the implementation of MySQLTCPSocket.open_connection (no replies)

$
0
0
In the current implementation, it raises an error immediately if a process fails at an ip address.
Why don't all element in addrinfos try to connect at first and throw an exception?
( The current implementation: https://github.com/mysql/mysql-connector-python/blob/403535dbdd45d894c780da23ba96b1a6c81e3866/lib/mysql/connector/network.py#L607 )

For example, if we use the --add-host=localhost:<local-ip-address> option when launch docker container,
it would insert the specified IP address in /etc/hosts.
However, the process connecting to mysql-db using mysql-connector-python fails in the current implementation when accessing 127.0.0.1 (which is usually set up) and the inserted ip adress are not used to access.

Viewing all articles
Browse latest Browse all 384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>