http://www.perlmonks.org?node_id=917400

Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

I'm getting an intermittent error connecting to MySQL with DBI. The message I get back is "Can't connect to MySQL server on '<DBSERVER>' (48)".

My question is simple ... what does the 48 part mean?

Also, how could I have googled or otherwise looked this up? Believe me, I did try.

Replies are listed 'Best First'.
Re: DBI error ... forty-eight
by Khen1950fx (Canon) on Jul 29, 2011 at 08:10 UTC
    48 looks like an error code. Try running
    perror 48
    It should say
    OS error code 48: Link number out of range
    Update: google "MySQL error 48"
Re: DBI error ... forty-eight
by Anonymous Monk on Jul 29, 2011 at 09:30 UTC
    Increase the DBI trace level and you'll get more detail
Re: DBI error ... forty-eight
by Cody Fendant (Hermit) on Jul 29, 2011 at 22:51 UTC
    UPDATE: I'm now being told by an administrator that the code is really a TCP/socket type error: "Address already in use" (EADDRINUSE) and not a MySQL error at all.
      EADDRINUSE on Linux is 98, but, on Windows Winsock, it's 10048---WSAEADDRINUSE. I still think that 48 is ELNRNG--link number out of range.
        So, what does "link number out of range" mean then?