smiffy has asked for the wisdom of the Perl Monks concerning the following question:
I replied to a post recently where the OP was unable to connect to a MySQL database because the DBD module was looking at the wrong socket. (Seems to be the default behaviour ;-)) At the time, I gave two solutions: one was to put a mysql_socket parameter in the connect string, the other was to set $ENV{MYSQL_UNIX_PORT}.
I have to report that I am unable to get the first method to work, more times than not - setting %ENV works every time.
As yet, I have been unable to see any rhyme nor reason for when the parameter method works or not. As I'm dealing with 4 machines, each with 2 different Perl versions, I simply don't have time to perform exhaustive tests. I do know that the parameter method is failing on this machine at this time - Perl 5.10.0 with a fresh Bundle::DBD::mysql installed from the CPAN shell.
Whilst this is not an issue for me - because I can use the %ENV method - it would be nice if anyone can throw any light on this, if for no other reason than a documented method not working.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: YAMSP (Yet Another MySQL Socket Problem)
by JavaFan (Canon) on Oct 11, 2008 at 23:36 UTC | |
by smiffy (Pilgrim) on Oct 12, 2008 at 00:20 UTC | |
Re: YAMSP (Yet Another MySQL Socket Problem)
by chrism01 (Friar) on Oct 13, 2008 at 01:58 UTC |