yet another cmd.php problem

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

Moderators: Developers, Moderators

Post Reply
Hexis
Posts: 4
Joined: Tue Feb 19, 2002 7:00 pm

Post by Hexis »

I can add users and other items in the web interface. But when I run cmp.php I get this:


noc:~$ php www/cacti/cmd.php
X-Powered-By: PHP/4.1.1
Content-type: text/html

<br>
<b>Warning</b>: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in <b>/data/webdata/htdocs/baxtermj/cacti/include/database.php</b> on line <b>19</b><br>
<br>
<b>Warning</b>: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
in <b>/data/webdata/htdocs/baxtermj/cacti/include/database.php</b> on line <b>19</b><br>

Cannot connect to MySQL server on localhost

Anyone know what's going on?

<font size=-1>[ This Message was edited by: Hexis on 2002-02-22 09:02 ]</font>

<font size=-1>[ This Message was edited by: Hexis on 2002-02-22 09:03 ]</font>
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

It appears that cacti is having trouble connecting to your MySQL server. First, make sure the $database_hostname variable is correct in the 'include/config.php' file.

If it is 'localhost', make sure your MySQL server is running correctly.

ps ax | grep mysqld

Should tell you if it is running or not.

-Ian
Hexis
Posts: 4
Joined: Tue Feb 19, 2002 7:00 pm

Post by Hexis »

Would the web interface work if it couldn't connect to the sql server?

But I did double check and everything is running. I can use the mysql console to use the cacti data base and it all look ok (to me) in there.
Guest

Post by Guest »

what do you have on your 19th line in cmd.php or more likely in www/cacti/include/config.php. if its in the config scripts it's likely to be in the one you have edited ...

I'm not sure, but i guess i had the same thing in my cron output. And my faults have been klumsy editing (of the config.php -- missing ';') and some very _very_ poor skils and knowledge of mysql.
my 2/100 €.
Hexis
Posts: 4
Joined: Tue Feb 19, 2002 7:00 pm

Post by Hexis »

In my include/config.php these are the only lines I edited:

$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "blah";

I didn't touch the cmd.php file at all, tho nothing looks outta place there to me.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest