Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to fix Munin errors: [email protected] cpanel mysql

Discussion in 'cPanel Developers' started by nichiyume, Jan 13, 2007.

  1. nichiyume

    nichiyume Member

    Nov 18, 2004
    Likes Received:
    Trophy Points:
    Phoenix, Az
    Seems many have this problem trying to get munin's graphs to show mysql.

    When you look at the logs, you see this error.
    tail /var/log/munin/munin-node.log
    CONNECT TCP Peer: "" Local: ""
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    This is from the mysqladmin location environment variables being lost due to a bug.

    Cpanel installs a configuration file with a simple mysql portion. This is what I changed it to.
    [email protected] [/etc/munin]# vi /etc/munin/plugin-conf.d/cpanel.conf
    user root
    group wheel
    env.mysqladmin /usr/bin/mysqladmin
    env.mysqlopts --defaults-extra-file=/root/.my.cnf 
    Not only does it use root, now it knows where mysqladmin is, and then a configuration file to login. In a rare case you might have to change the mysql root password to sync, easily done in WHM. /root/.my.cnf has the root mysql password in it. Protect it!

    In order to get the new variables to work, you have to run as root a forced update.
    killall munin-node
    /usr/share/munin/munin-update  --force-root
    service restart munin-node 
    You can run munin-update as user munin later since it throws a fit when you run it as root.
    killall munin*
    su -l munin /usr/share/munin/munin-update
    service restart munin-node
    Check the log for errors. The error message for root'@'localhost' (using password: NO)' has dissappeared!
    tail /var/log/munin/munin-node.log -n 100
    I ended up having to reboot the whole server due to not munin not working at all after hours of work. All of the graphs work fine! I still get some Exim error, but the graphs work and I Don't care.

    RayRay forums Free gallery my webpage
    I know a guy named Sig
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 nichiyume, Jan 13, 2007
    Last edited: Jan 13, 2007

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice