zoukankan      html  css  js  c++  java
  • zabbix连不上数据库

    [root@localhost etc]# tail -f /var/log/zabbix_server.log
    1267:20130722:195451.493 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195451.493 Database is down. Reconnecting in 10 seconds.
    1267:20130722:195501.494 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195501.494 Database is down. Reconnecting in 10 seconds.
    1267:20130722:195511.494 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195511.494 Database is down. Reconnecting in 10 seconds.
    1267:20130722:195521.495 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195521.495 Database is down. Reconnecting in 10 seconds.
    1267:20130722:195531.495 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195531.496 Database is down. Reconnecting in 10 seconds.
    1267:20130722:195541.496 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195541.496 Database is down. Reconnecting in 10 seconds.
    1267:20130722:195551.498 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    1267:20130722:195551.498 Database is down. Reconnecting in 10 seconds.


    解决办法:
    [root@localhost lib]# mkdir /var/lib/mysql
    [root@localhost lib]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
    [root@localhost lib]# /etc/rc.d/init.d/mysqld restart
    Shutting down MySQL... SUCCESS!
    Starting MySQL SUCCESS!

  • 相关阅读:
    jQuery选择器
    CSS选择器性能分析
    JavaScript 之垃圾回收和内存管理
    六个字符,带你领略JavaScript (js的艺术编写)
    Redis(1) 简介以及linux环境下的安装
    Teamviewer被商业检测处理办法
    Linux 分配/home的磁盘空间给根目录
    vmware虚拟机安装Oracle Linux 出现Unable to open the image
    Vim编辑器常用命令
    Xshell连接虚拟机中的Ubuntu
  • 原文地址:https://www.cnblogs.com/seasonsstory/p/3209785.html
Copyright © 2011-2022 走看看