• Welcome to The Network People Support Forums. Please login or sign up.

mysqlstatus.pl and .my.cnf

Started by gjsiiger, May 26, 2004, 08:23:54 AM

Previous topic - Next topic

gjsiiger

mysqlstatus.pl won't pull out data from my MySQL server, and it seems like it completely ignores my .my.cnf file.

mysql works with the .cnf but mysqlstatus.pl stays:

DBI connect('database=mysql;host=localhost;port=3306','root',...) failed: Access denied for user: 'root@localhost' (Using password: NO) at /usr/local/lib/perl5/site_perl/5.8.2/MATT/Mysql.pm line 248
db connect failed:
at /usr/local/sbin/mysqlstatus.pl line 63
Can't call method "prepare" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.2/MATT/Mysql.pm line 212.

If I add the password directly in Mysql.pm then it works.

strange, but true.. And ideas guys ?

matt

Pay attention to what user mysqlstatus is running as. That will determine where it looks for the .my.cnf file.

gjsiiger

It runs as root, and .my.cnf works fine. Just not mysqlstatus.pl
It doesn't change uid itselves ?

gjsiiger

Upgraded to v3.42 - and not it works !