Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16867

MySQL: /var/lib/zabbix/.my.cnf is ignored

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 4.4.0, 4.4.1
    • Server (S)

      Steps to reproduce:

      1. Enable MySQL monitoring in Zabbix server and a remote  agent
      2. Create /var/lib/zabbix/.my.cnf  per instructions with MySQL credentials.  For OS Linux: You need create .my.cnf in zabbix-agent home directory (/var/lib/zabbix by default)
      3. See an MySQL connect error

      Result:

       

      # zabbix_get -s 1.2.3.4 -k "mysql.ping[localhost,3306]"
      mysqladmin: connect to server at 'localhost' failed
      error: 'Access denied for user 'zabbix'@'localhost' (using password: NO)'

       

       

      Expected:
      Successful connect to MySQL

      A possible workaround it to add HOME=/var/lib/zabbix/ into /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf

       

      Kindly advice.

       

      Regards,
      Alex.

            zabbix.support Zabbix Support Team
            zeiter Alex Grebenschikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: