According to several tutorials, the following should work:
Create a new user in MySQL.
$ mysql -uroot -p
> CREATE USER 'munin'@'localhost';
> exit;
Use that user in munin to access the database:
edit /etc/munin/plugin-conf.d/munin-node
. At [mysql*] set the following:
[mysql*]
env.mysqlopts -u munin
Strange thing, is that running
/usr/sbin/munin-node-configure --suggest | grep mysql
Which tells me that MySQL cannot access the database and that it tries to access the database using user root:
[DBI connect('mysql;mysql_connect_timeout=5','root',...) failed: Access denied for user 'root'@'localhost' (using password: NO)
This is a CentOS 5.5 machine.
Why should munin-node-configure ignore the setting in /etc/munin/plugin-conf.d/munin-node? Should I set this elsewhere? Reloading or restarting the munin-node deamon changes nothing either.
For Munin 1.4.7 there is error in documentation: mysql plugin looks for environment variables using another name.
You can check /usr/share/munin/plugins/mysql_
So because the script doesn't check 'mysqlopts' I had to set up
then restart munin-node (just to be on the safe side).
for me wildcards didnt seem to work either but the following did work