Ad Widget

Collapse

Zabbix doesn't work after location of MYSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ittec
    Member
    • Mar 2008
    • 73

    #1

    Zabbix doesn't work after location of MYSQL

    Hi

    Recently I did a maintenance procedure on Zabbix Server. MySQL zabbix database was very huge and I was able to reduce a lot.

    Now I run Zabbix Server in one CentOS 5 box and MySQL zabbix database instance in another CentOS 5 box.

    I did changes through administration/installation and test db was OK, instead, all was ok.

    But now after restart both linux boxes, zabbix_server.log output is:

    Code:
    8091:20100923:143509 Starting zabbix_server. ZABBIX 1.6.5 (revision 7442).
      8091:20100923:143509 **** Enabled features ****
      8091:20100923:143509 SNMP monitoring:        NO
      8091:20100923:143509 WEB monitoring:        YES
      8091:20100923:143509 Jabber notifications:   NO
      8091:20100923:143509 ODBC:                   NO
      8091:20100923:143509 IPv6 support:           NO
      8091:20100923:143509 **************************
      8091:20100923:143509 [Z3001] Connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    Error is pretty clear. Cann connect with MySQL server. But how can it be? I did the steps with Administration/installation and I change IP of MySQL server. And test connections worked good!

    I have checked conf/zabbix.conf.php and the changes that I did before are in the file. So this ok too.

    What's happening?

    I know most of people using zabbix can separate MySQL from Zabbix Server Web...

    Thanks
  • f.koch
    Member
    Zabbix Certified Specialist
    • Feb 2010
    • 85

    #2
    Hi,

    have you also changed zabbix_server.conf ?


    Code:
    ### Option: DBHost
    #       Database host name.
    #       If set to localhost, socket is used for MySQL.
    #
    # Mandatory: no
    # Default:
    DBHost=
    
    ### Option: DBName
    #       Database name.
    #       For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
    #
    # Mandatory: yes
    # Default:
    # DBName=
    
    DBName=
    
    ### Option: DBUser
    #       Database user. Ignored for SQLite.
    #
    # Mandatory: no
    # Default:
    # DBUser=
    
    DBUser=
    
    ### Option: DBPassword
    #       Database password. Ignored for SQLite.
    #       Comment this line if no password is used.
    #
    # Mandatory: no
    # Default:
    DBPassword=
    
    ### Option: DBSocket
    #       Path to MySQL socket.
    #
    # Mandatory: no
    # Default:
    DBSocket=/var/lib/mysql/mysql.sock
    
    ### Option: DBPort
    #       Database port when not using local socket. Ignored for SQLite.
    #
    # Mandatory: no
    # Range: 1024-65535
    # Default (for MySQL):
    DBPort=3306

    Comment

    Working...