Ad Widget

Collapse

MySQL template problems executing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cferrebe
    Junior Member
    • Jul 2017
    • 1

    #1

    MySQL template problems executing

    Hello,

    I've installed Zabbix agent in one server where MySQL is installed.

    I've created zabbix user into mySQL and assigned grants to localhost,127.0.0.1 and any host.

    I have my configuration file inside:
    /etc/zabbix/db/.my.cnf

    [mysql]
    user=zabbix
    password=123456
    host=10.34.4.67

    [mysqladmin]
    user=zabbix
    password=123456
    host=10.34.4.67

    Inside userparameter_mysql.conf, I have changed HOME variable to:
    HOME=/etc/zabbix/db

    I get error for all checks (except version):
    Received value [ERROR 2003 (HY000): Can't connect to MySQL server on '10.34.4.67' (13)] is not suitable for value type [Numeric (float)]

    I know that .my.cnf is read properly, because if I change IP to localhost or 127.0.0.1, then it appears same error but with IP changed to 10.34.4.67

    If I execute command manually in the server, for example:
    mysqladmin --defaults-file=/etc/zabbix/db/.my.cnf ping | grep -c alive

    It returns me a proper value:
    1

    So, it seems mysql is running properly and my.cnf file is properly configured, but I don't know why, when it is executed with Zabbix agent, it fails.

    Can you help me in troubleshooting a little more on this?

    Thanks,
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    Originally posted by cferrebe
    Hello,

    I've installed Zabbix agent in one server where MySQL is installed.

    I've created zabbix user into mySQL and assigned grants to localhost,127.0.0.1 and any host.

    I have my configuration file inside:
    /etc/zabbix/db/.my.cnf

    [mysql]
    user=zabbix
    password=123456
    host=10.34.4.67

    [mysqladmin]
    user=zabbix
    password=123456
    host=10.34.4.67

    Inside userparameter_mysql.conf, I have changed HOME variable to:
    HOME=/etc/zabbix/db

    I get error for all checks (except version):
    Received value [ERROR 2003 (HY000): Can't connect to MySQL server on '10.34.4.67' (13)] is not suitable for value type [Numeric (float)]

    I know that .my.cnf is read properly, because if I change IP to localhost or 127.0.0.1, then it appears same error but with IP changed to 10.34.4.67

    If I execute command manually in the server, for example:
    mysqladmin --defaults-file=/etc/zabbix/db/.my.cnf ping | grep -c alive

    It returns me a proper value:
    1

    So, it seems mysql is running properly and my.cnf file is properly configured, but I don't know why, when it is executed with Zabbix agent, it fails.

    Can you help me in troubleshooting a little more on this?

    Thanks,
    for what i know you dont have to have this "HOME=/etc/zabbix/db"
    delete this and try

    Comment

    Working...