Hi,
This more a MYSQL problem than PHP I think, but alot of people are experts in both! 😉
We are getting the following error after rebooting our
webserver (everthing was ok before!):
Warning: mysql_connect() [function.mysql-connect]: Can't
connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in
/usr/local/apache/htdocs/mydbdir/inc/db_access_us
er.php on line 9
Could not make a connection to the server!
Apache is working ok (fully tested), the problem seems to be with MYSQL
server, the mysql prog is loaded and running but we cannot
access any db's via http (or phpadmin etc). Have tried starting
and stopping it, reloading permissions.. etc
Been looking at the config for MYSQL files/variables -
everything seems ok, mysqladmin reports the db's are ok. Nothing appears in the mysql error log.
The mysql socket file is created ok - which it complains about
in the error message above - the only thing is the socket file is
in /var/lib/mysql/mysql.sock not "/tmp/mysql.sock" I don't
know if this a standard error message or it is actually looking
in /tmp/ ???
The mysqladmin variables commnd reports it is using
/var/lib/mysql dir for the socket file
I get the feeling this is something silly, as everthing checks out
ok! Got any ideas anyone?? - this is driving me mad
:mad:
Thanks
Barry