码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix 的报错sock报错

时间:2015-11-23 06:31:08      阅读:358      评论:0      收藏:0      [点我收藏+]

标签:through   server   local   mysql   

Tail var/log/zabbix/zabbix_server

mysql_connect(): Can‘tconnect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)[include/db.inc.php:77]Error connecting to database [Can‘t connect to localMySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)]

出现sock问题 sock [2002]

 

更改配置文件/etc/my.cnf

[mysqld]

port            = 3306

socket          = /var/lib/mysql/mysql.sock

skip-locking

key_buffer_size = 256M

datadir         = /data/mysql

max_allowed_packet = 1M

table_open_cache = 256

sort_buffer_size = 1M

read_buffer_size = 1M

read_rnd_buffer_size = 4M

myisam_sort_buffer_size =64M

thread_cache_size = 8

query_cache_size= 16M

/etc/zabbix/zabbix_server.conf下的sock路径为正确路径

DBsock =/var/lib/mysql/mysql.sock


本文出自 “学习linux” 博客,请务必保留此出处http://10265013.blog.51cto.com/10255013/1715741

zabbix 的报错sock报错

标签:through   server   local   mysql   

原文地址:http://10265013.blog.51cto.com/10255013/1715741

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!