OK, I have a Red hat 9 box with apache 2.0.47 php 4.3.2 and MySQL 3.23.57-max. Mysql works fine using things like mysqladmin at the bash prompt, I can log in create tables, delete data etc. I installed phpMyAdmin 2.3.3pl1 and this works fine it connects to mysql server and lists all DB's and can create/change them as needed. The problem happens with 2 things I have found so far PHP-BB and squidalyser. Both of these use mysql DB's to store data I have used PHP-BB before so am pretty sure is nothing i'm doing wrong with the setup of that. The intresting thing is this squidalyser comes with a perl script that puts log data into the mysql database and this is run via cron. The script runs fine connects to the DB and puts all the log data in it. However when I run the web perl script from the cgi-bin dir it fails and the httpd log prints
[Sat Sep 13 12:01:57 2003] [error] [client 18.104.22.168] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) at /usr/local/apache2/cgi-bin/squidalyser.pl line 514.
Help! I have checked the location of the socket file in /etc/my.cnf and its the correct place I have also checked the socket file is being created and it is. I have checked the mysqld log and no errors. What going on?