Error connecting on new install
well my first install of NetMRG worked great..
my second attempt has not been as friendly
I am installing on Fedora RC3 and with a lot of trial and error I got it to compile and make install ok
all of the other installation instructions appeared to have worked ok however....
the web page shows
[DB_ERROR Cannot connect to the database server.
and the httpd error_log shows
Wed Mar 09 183037 2005] [error] [client 127.0.0.1] File does not exist /var/www/html/favicon.ico
[client 127.0.0.1] PHP Warning mysql_connect() Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/netmrg/lib/database.php on line 33
mysql -u netmrguser --password=netmrgpass
logs in ok
I am not that experienced at all of this and have tried and retried the install instructions
Any advice or other places to look in the logs to see what is going on?
rrdtool is 1.0.49
php -v gives me
PHP Warning Unknown() Invalid library (maybe not a PHP library) 'rrdtool.so' in Unknown on line 0
PHP 4.3.9 (cgi) (built Oct 20 2004 145204)
( does the first error there mean my rrdtool install is not dont correctly?
[quotef92328ffe1="cantripnet"]mysql -u netmrguser --password=netmrgpass[/quotef92328ffe1]
Try connecting to the socket directly from the mysql client, like so
[code1f92328ffe1]mysql -u netmrguser --password=netmrgpass -S /var/lib/mysql/mysql.sock[/code1f92328ffe1]
[quotef92328ffe1="cantripnet"]PHP Warning Unknown() Invalid library (maybe not a PHP library) 'rrdtool.so' in Unknown on line 0
PHP 4.3.9 (cgi) (built Oct 20 2004 145204)
( does the first error there mean my rrdtool install is not dont correctly?[/quotef92328ffe1]
This error is normal when you have the php-rrdtool package installed (not required by NetMRG) - your RRDtool install is fine.
thank you-- that invalid library had me a little worried
That seemed to connect just swell
[root@mrtg httpd]# mysql -u netmrguser --password=netmrgpass -S /var/lib/mysql/mysql.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 229 to server version 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
I confirmed that the .xml in etc has the correct paths
all seems ok
Try connecting as a non-root user; su - netmrg, or login as your own user and see if you can still connect to the server with the same command.
It works fine as myself with the same command
and I have added no rights to the pellis user.
I also tried adding the path in the socket area of the xml, but to no avail
Connecting to mysql seems ok and a status seems to look like it is on the right db,host, and user
why I am using a latin1 charset - I do not know
but I issued the command as a non su so it seems to run ok there
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
Connection id 1655
Current database netmrg
Current user netmrguser@localhost
Current pager stdout
Using outfile ''
Server version 3.23.58
Protocol version 10
Connection Localhost via UNIX socket
Client characterset latin1
Server characterset latin1
UNIX socket /var/lib/mysql/mysql.sock
Uptime 5 days 15 hours 2 min 54 sec
Threads 1 Questions 5126 Slow queries 0 Opens 65 Flush tables 1 Open t
ables 30 Queries per second avg 0.011
My php version is PHP 4.3.9 (cgi) (built Oct 20 2004 145204)
and RRDTOOL is at RRDtool 1.0.49
what is the best way to check on the versions of the other libraries needed ( libstdc++,Libxml2, and net/ucd-snmp ) ? I am unsure of a command to tell me the versions I have ( all the latest I think but I would like to confirm it)
libstdc++ version follows along with your gcc version. Libxml2 and net/ucd-snmp versions should be available by checking the packages that you installed that software from.
Are you having problems now, or has running the database locally fixed everything for you?
Unluckily it is still giving the exact same error message in the webpage when I try to connect
DB_ERROR Cannot connect to the database server.
and the same error_log entry for httpd
[client 22.214.171.124] PHP Warning mysql_connect() Can't connect to local MyS
QL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/netmrg/lib
/database.php on line 33
Have you been able to get any other PHP/MySQL apps to work on your server? From my perspective, it looks as if this problem is not related to NetMRG directly. You might have more luck by debugging things from the PHP and MySQL end of things.
I could, but it was 50/50 on anything I tried.
So I started over for the 4th time but made the most bloated
Linux install ever ( I selected EVERYTHING on the Fedora install)
did rrdtool and netmrg from source and had to add the path for rrdtool
into the netmrg, it would not find it on its own.
Now it all works great-
I am sure with several more hours I could have located the specific problems and fixed them; but the complete install took less time.