mysql probe available KPI shows Can't connect to local MySQL server through socket error
search cancel

mysql probe available KPI shows Can't connect to local MySQL server through socket error

book

Article ID: 239438

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM) DX Unified Infrastructure Management (Nimsoft / UIM) Unified Infrastructure Management for Mainframe CA Unified Infrastructure Management SaaS (Nimsoft / UIM)

Issue/Introduction

We are able to connect mysql db in mysql probe but getting the error Can't connect to local MySQL server through socket.

Environment

Release : 20.3

Component : UIM MYSQL

  • probe :mysql
  • version:1.51/1.70
  • mysql version : 5.6.19
  • robot version:9.33

Cause

- configuration

Resolution

It seems to be the sample connection that is generating that alarm, you don't need it, its just an example, so you can disable it or delete it and use your own and specify the host or IP address,

<sample_connection>
      username = sample_user
      password = 
      description = sample connection
      address = localhost
      retry_attempts = 3
      retry_delay = 5 sec
      port_number = 3306
      option = 2
      path = /var/lib/mysql/mysql.sock
   </sample_connection>

From the mysql techdocs:

https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=jgunKnpVrJoL39QtfVafIQ==

Verify if you can connect using the ipaddress instead of the hostname.

Make sure that mysqld is running. Update the MySQL client config. 

https://dev.mysql.com/doc/refman/8.0/en/problems-with-mysql-sock.html

Specify the path to the socket in a global or local option file and make sure that the path specified in the probe is updated.

See also:
https://stackoverflow.com/questions/4448467/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock