Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: DBI mysql connection broke suddenly

by afoken (Chancellor)
on Nov 10, 2022 at 20:17 UTC ( [id://11148116]=note: print w/replies, xml ) Need Help??


in reply to Re^2: DBI mysql connection broke suddenly
in thread DBI mysql connection broke suddenly

Right in principle, but wrong for this special case.

Long ago, someone has decided that the hostname "localhost" is special for MySQL. It won't be resolved at all, instead it connects via a Unix socket on Unix and via shared memory on Windows. On Windows, the hostnames "." and "" are also special, they use a named pipe instead of shared memory. This is documented e.g. in https://dev.mysql.com/doc/refman/8.0/en/connecting.html, in DBD::mysql and in DBD::MariaDB. If you want to connect to the local machine via TCP/IP, you have to use "127.0.0.1" or "::1".

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^3: DBI mysql connection broke suddenly

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148116]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-18 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found