Ad Widget

Collapse

mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mys

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carlos.costa
    Junior Member
    • May 2012
    • 4

    #1

    mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mys

    When I access my Zabbix is occurring this message:

    mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)[/usr/share/zabbix/include/db.inc.php:58]

    Someone can help me for solve this problem!? Zabbix version is 1.8.5

    Thanks in advance.
  • after
    Junior Member
    • May 2012
    • 1

    #2
    Hi,

    This is not (only) related to Zabbix.

    Mentioned issue is related to MySQL DB. First, find path to mysql socket.

    Through mysql client:

    show global variables like '%socket%';

    or directly on linux box:

    ps xa | grep mysql

    or take a look in mysql conf flie my.cnf

    And this valid path place in Zabbix conf file.

    Comment

    Working...