Ad Widget

Collapse

Template App MySQL configuration error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nmz
    Member
    • Jan 2016
    • 69

    #1

    Template App MySQL configuration error

    I'm setting up Template App MySQL. MySQL is down(0) in latest data. When I check the agent log I got those error

    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
    I can't login/access mysql. Already access .my.cnf and below is userparameter_mysql.conf

    Code:
    # For all the following commands HOME should be set to the directory that has .my.cnf file with password information.
    
    # Flexible parameter to grab global variables. On the frontend side, use keys like mysql.status[Com_insert].
    # Key syntax is mysql.status[variable].
    UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | HOME=/var/lib/zabbix/ mysql -N | awk '{print $2}'
    
    # Flexible parameter to determine database or table size. On the frontend side, use keys like mysql.size[zabbix,history,data].
    # Key syntax is mysql.size[<database>,<table>,<type>].
    # Database may be a database name or "all". Default is "all".
    # Table may be a table name or "all". Default is "all".
    # Type may be "data", "index", "free" or "both". Both is a sum of data and index. Default is "both".
    # Database is mandatory if a table is specified. Type may be specified always.
    # Returns value in bytes.
    # 'sum' on data_length or index_length alone needed when we are getting this information for whole database instead of a single table
    UserParameter=mysql.size[*],echo "select sum($(case "$3" in both|"") echo "data_length+index_length";; data|index) echo "$3_length";; free) echo "data_free";; esac)) f$
    
    UserParameter=mysql.ping,HOME=/var/lib/zabbix/ mysqladmin ping | grep -c alive
    UserParameter=mysql.version,mysql -V
    those are .my.cnf file
    Code:
    [mysql]
    user=user_name
    password=password
    [mysqladmin]
    user=user_name
    password=password
    What am I missing and how can I fix mysql error?
  • nmz
    Member
    • Jan 2016
    • 69

    #2
    That's error what I got when I run
    Code:
     mysqladmin ping | grep -c alive
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    0
    How can i fix it?

    Comment

    • nmz
      Member
      • Jan 2016
      • 69

      #3
      This is log from mysql
      Code:
      2016-02-01 09:22:27 2303 [Note] InnoDB: 128 rollback segment(s) are active.
      2016-02-01 09:22:27 2303 [Note] InnoDB: Waiting for purge to start
      2016-02-01 09:22:27 2303 [Note] InnoDB: 5.6.27 started; log sequence number 16584556591
      2016-02-01 09:22:27 2303 [Note] Server hostname (bind-address): '*'; port: 3306
      2016-02-01 09:22:27 2303 [Note] IPv6 is available.
      2016-02-01 09:22:27 2303 [Note]   - '::' resolves to '::';
      2016-02-01 09:22:27 2303 [Note] Server socket created on IP: '::'.
      2016-02-01 09:22:27 2303 [Warning] 'proxies_priv' entry '@ [email protected]' ignored in --skip-name-resolve mode.
      2016-02-01 09:22:28 2303 [Note] Event Scheduler: Loaded 1 event
      2016-02-01 09:22:28 2303 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '5.6.27'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

      Comment

      • wdijkerman
        Junior Member
        • Jan 2015
        • 18

        #4
        Hi,

        is "/var/lib/zabbix/" owned and/or readable by user Zabbix?
        Also applies to the .my.cnf file?

        Comment

        • nmz
          Member
          • Jan 2016
          • 69

          #5
          Originally posted by wdijkerman
          Hi,

          is "/var/lib/zabbix/" owned and/or readable by user Zabbix?
          Also applies to the .my.cnf file?
          Yeah changed it to zabbix owned and still got error. I think mysql problem but no idea to fix it.

          Comment

          • nmz
            Member
            • Jan 2016
            • 69

            #6
            One more error MySQL status is showing up and I got this error
            Code:
            Received value [] is not suitable for value type [Numeric (float)]
            in other items from the defualt mysql app template.

            Comment

            • wdijkerman
              Junior Member
              • Jan 2015
              • 18

              #7
              What user do you use in the .my.cnf?

              I believe the 'mysqladmin' command is only possible with the 'root' user in MySQL?

              Comment

              Working...