Fix Unknown Table Engine ‘INNODB’ Error For MySQL Munin Plugin

If you are running Munin on a newish server, with a new version of MySQL and you have InnoDB disabled (as recommended by scripts like mysqltuner.pl), the Munin plugins for MySQL will fail with the following error:

DBD::mysql::st execute failed: Unknown table engine 'INNODB' at /etc/munin/plugins/mysql_connections line 958.

It’s a pretty easy fix though, just edit the follow file:

sudo nano /usr/share/munin/plugins/mysql_

And at line 960-965 (+960 in vim or CTRL+_ 960 in nano), replace this:

if ($@) {
if ($@ =~ /Cannot call SHOW INNODB STATUS because skip-innodb is defined/) {
$data->{_innodb_disabled} = 1;
return;
}
die $@;

With this:

if ($@) {
if ($@ =~ /Unknown table engine 'INNODB'|Unknown storage engine 'innodb'|Cannot call SHOW INNODB STATUS because skip-innodb is defined/i) {
$data->{_innodb_disabled} = 1;
return;
}
die $@;

Your MySQL plugins for Munin should now work fine 🙂

Comments

comments

Subscribe

You can subscribe via e-mail to get my posts in your Inbox, or stalk me on numerous other platforms.

, , , , , , ,


Comments are closed.
 
Keep up with me on Social Media by following me below - Thanks so much!