munin node config for mysql not working

Bug #1880662 reported by Oliver Mueller
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
munin (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I just installed a fresh Ubuntu 20.04 with mysql and munin.

It previously worked quite well with Ubuntu 18.04, but now the default plugin-conf.d/munin-node file seems to not work anymore for mysql.

Here is the output of it:
# munin-run mysql_commands
DBI connect('mysql;mysql_read_default_file=/etc/mysql/debian.cnf;mysql_connect_timeout=5','root',...) failed: Access denied for user 'root'@'localhost' (using password: YES) at /etc/munin/plugins/mysql_commands line 1071.
Warning: the execution of 'munin-run' via 'systemd-run' returned an error. This may either be caused by a problem with the plugin to be executed or a failure of the 'systemd-run' wrapper. Details of the latter can be found via 'journalctl'.

The mysql section in /etc/munin/plugin-conf.d/munin-node looks like:

[mysql*]
user root
env.mysqlopts --defaults-file=/etc/mysql/debian.cnf
env.mysqluser root
env.mysqlconnection DBI:mysql:mysql;mysql_read_default_file=/etc/mysql/debian.cnf

which will result in an error using e.g. mysql_commands or so.

Changing this section to...

[mysql*]
user root
env.mysqluser debian-sys-maint
env.mysqlconnection DBI:mysql:mysql;mysql_read_default_file=/etc/mysql/debian.cnf

...did the trick for my installation.

The main problem seems to be the mysqluser set to root even though the default file contains only a "debian-sys-maint" user.

Revision history for this message
Vivien GUEANT (vivienfr) wrote :

I have the same type of access problem for other plug-ins : "File /tmp/rsyncd.log cannot be read." or "/usr/bin/tail: cannot open '/home/[...].csv' for reading: Permission denied"

Everything worked perfectly with Ubuntu server 18.04, the regression happened after updating to Ubunut server 20.04

Would that be an apparmor limitation ?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in munin (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.