Steve Poskitt wrote:
> I have a problem with Apache Server and MySQL. I have
> looked for an answer on the Web but so far no luck.
> System : Pentium 200 MMX
> Apache : V 1.3.12
> MySQL : V3.22.32
> When trying to access the MySQL database through CGI
> scripts I get the following message :
> "DBI->connect failed: Can't connect to local MySQL
> server through socket '/var/lib/mysql/mysql.sock'
> (111) at /home/httpd/cgi-bin/perl/lib/DB.pm line 109!
> I have tried changing user permissions and a variety
> of suggestion from the web all to no avail !
> Can somebody suggest a remedy.
> Apache is running as default user "nobody" and I have
> tried to give permissions for that user to access the
> database. It seems to be a problem with Apache
> accessing the socket.
> Steve Poskitt
"nobody" will need search permissions on /var/lib/mysql to find the socket
Personally, I don't like that, so I put my socket in /usr/local/tmp.
Red Hat linux has a nasty habit of cleaning up the /tmp directory, so you
don't want to put it there.