On 13 Jan 2005 at 10:47, Sid Lane wrote:

> hope this isn't considered too off-topic but...
> 
> I have been working on standardizing the directory trees on our MySQL
> servers (a la OFA for those who speak Oracle) but when I repoint the
> socket parameter in my.cnf all my perl scripts barf w/:
> 
> "Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2) at ./somescript.pl line 666"
> 
> I can connect from a shell w/the mysql client no problem.  it's only
> DBD that's having this problem and pointing socket back in my.cnf and
> restarting mysql fixes it which leads me to believe this is statically
> configured into DBD when you build it.
> 
> does anyone know if this is the case?  is there anything short of
> rebuilding DBD that will get it to use the new location?
> 
> any help would be appreciated.

Hi,

If you are using *nix platform then you can create a symbolic link to the new 
location 
of the socket file:

ln -s /new/location/mysql.sock /var/lib/mysql/mysql.sock

I have to do this because sometimes Chiliasp looks for the socket in /tmp.

You could also investigate whether DBD needs / reads a special entry in the 
my.ini / 
my.cnf file


You might be able to do something similar under windows using SysInternals 
*junction* tool ( freeware:  
http://www.sysinternals.com/ntw2k/source/misc.shtml ) 
but I believe this only works with directories.

Ian
-- 

Reply via email to