fereknowledge.blogg.se

Pymysql localhost 127.0.0.1
Pymysql localhost 127.0.0.1




pymysql localhost 127.0.0.1

"localhost" in MySQL permission means "unix domain socket". This has nothing to do with whether an IP connection or Unix socket is used, and everything to do with how permissions are resolved, as his examples clearly stated.Īnd I already replied the answer in #509 (comment). But it seems the library resolves the hostname to the local IPv6 address: ::1" is nonsense. If there are little network knowledge, "the connection should be created with hostname "localhost".

pymysql localhost 127.0.0.1

I'm very frustrated people treat OSS maintainer as free tech support, instead of using community for asking beginner's question. I'm not pleased to see the maintainer acting like an arrogant dick either. There is MySQL slack community, or Stackoverflow.

pymysql localhost 127.0.0.1

PyMySQL author (only one in this world), and (2) many others can solve their issue by googling.Īs someone trying to resolve this exact same issue, two years later.no, no it's not easily resolvable by Googling.

pymysql localhost 127.0.0.1

If you post this question in Stackoverflow, (1) one of many MySQL experts can answer instead of If there are many knowledge in the StackOverflow, many users can solve their problem by Googling. Polished questions and answers are reusable knowledge. Every MySQL experts know about is designed to polish questions and answers. You must specify unix_socket option explicitly.Īnd this special behavior is very common pitfall. Since PyMySQL doesn't know where unix socket is, PyMySQL can't emulate such a special behavior. This occurs even if a -port or -P option is given to specify a port number. For connections to localhost, MySQL programs attempt to connect to the local server by using a Unix socket file. On Unix, MySQL programs treat the host name localhost specially, in a way that is likely different from what you expect compared to other network-based programs. Actually speaking, this is not a bug but a limitation.






Pymysql localhost 127.0.0.1