mikaku / Monitorix

Monitorix is a free, open source, lightweight system monitoring tool.
https://www.monitorix.org
GNU General Public License v2.0
1.12k stars 167 forks source link

MYSQL GRAPH - Error #6

Closed Altegras closed 11 years ago

Altegras commented 11 years ago

Hello,

Great project ! I'm using it from few years ago ... on all my servers.

There is a minor bug in /usr/bin/monitorix - if you take mysql statistics and connecting via socket, it returns:

DBI connect('mysql_socket=/var/run/mysqld/mysqld.sock','HASH(0x2b5d0d8)',...) failed: Access denied for user 'HASH(0x2b5d0d8)'@'localhost' (using password: NO) at /usr/bin/monitorix line 4475

That line it's:

$dbh = DBI->connect( "DBI:mysql:mysql_socket=$sock", { PrintError => $print_error, } ) or logger("$myself: Cannot connect to MySQL '$sock'.") and next;

it should be:

$dbh = DBI->connect( "DBI:mysql:mysql_socket=$sock", $user, $pass, { PrintError => $print_error, } ) or logger("$myself: Cannot connect to MySQL '$sock'.") and next;

Modified in my script and works flawlessly. Have a good day !

mikaku commented 11 years ago

Thanks for your feedback. This issue was known and is already fixed in the new (just released) 3.0.0 version.