[rt-users] Re: Internal Server Error

seph seph at directionless.org
Mon Nov 15 18:12:08 EST 2004


> DBI connect('dbname=rt3;host=localhost','rt_user',...)
> failed: Can't connect to local MySQL server through
> socket '/tmp/mysql.sock' (2) at

well, is /tmp/mysql.sock where your mysql leaves it's socket? I bet
not. 

mysql tries to use the socket to talk to the server when the hostname
is localhost. However, DBD::mysql doesn't read my.cnf, which means
that if your socket is in a funny location, you can lose trying to
connect to database running on localhost.

There are 2 easy ways to fix this. Not using "localhost" as the db
server name should work, or you can set the environmental variable
MYSQL_UNIX_PORT appropriately. for example, one of my RT_SiteConfig
files has: $ENV{'MYSQL_UNIX_PORT'}="/opt/mysql/var/mysql.sock";

seph



More information about the rt-users mailing list