MySQL connect errors

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
pbertain
Posts: 4
Joined: Mon Apr 08, 2002 2:41 pm
Contact:

MySQL connect errors

Post by pbertain »

I think I've got everything installed correctly but I am guessing I need to tweak some configs/settings. I get the following error when I connect to http://myhost/cacti. I have seen the first error message on my RedHat 7.2 machine as well so I think I am consistent in my screw-ups.

I am running:
Mac OS X (10.1.3)
MySQL 3.23.49
PHP 4.1.2
rrdTool 1.0.35 AND
ucd-snmp 4.2.3

Below are the error messages I get when I try to connect.

Paul


Warning: Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (2) in /usr/local/cacti-0.6.7/auth/include/database.php on line 18

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (2) in /usr/local/cacti-0.6.7/auth/include/database.php on line 18
Cannot connect to MySQL server on localhost
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I had the same problem once, and I ended up giving in by actually changing MySQL's socket to that path in '/etc/my.cnf'.

However, this is by no means a complete solution as I was never able to figure out where PHP was coming up with the odd MySQL socket path. It wasn't in '/etc/php.ini' as far as I could tell.

Anyone else have a better solution to this?

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests