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: root@localhost cpanel mysql

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

  1. nichiyume

    nichiyume Member

    Joined:
    Nov 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    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.
    Code:
    tail /var/log/munin/munin-node.log
    CONNECT TCP Peer: "127.0.0.1:36819" Local: "127.0.0.1:4949"
    /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.
    Code:
    root@moo [/etc/munin]# vi /etc/munin/plugin-conf.d/cpanel.conf
    [mysql*]
    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.
    Code:
    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.
    Code:
    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!
    Code:
    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
    cyborgcow.net 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
Loading...

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