Ad Widget

Collapse

Cannot connect to the database during Configuration of DB Connection at Zabbix GUI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • midildi
    Junior Member
    • Jan 2023
    • 3

    #1

    Cannot connect to the database during Configuration of DB Connection at Zabbix GUI

    Hello! I would like to ask for help with my encountered problem. I am now configuring Zabbix at GUI and can't proceed to next step as error shows "Cannot connect to the database".
    Click image for larger version

Name:	image.png
Views:	1500
Size:	31.2 KB
ID:	457031

    Logs at zabbix_server and mysqld seems okay ( I did not see any errors/warnings)

    I can also login at mysql using the user/db that I created:
    Code:
    ​[root@nms zabbix]# sudo -u zabbix mysql -u zabbix --database=zabbix -p
    Enter password:
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 55
    Server version: 8.0.30 Source distribution
    
    Copyright (c) 2000, 2022, Oracle and/or its affiliates.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>

    Also, I disabled the SELinux
    Code:
    [root@nms etc]# getenforce
    Disabled
    [root@nms etc]# cat /etc/selinux/config | grep disabled
    # disabled - No SELinux policy is loaded.
    SELINUX=disabled
    [root@nms etc]#
    ​
    Current config at zabbix_server.conf:
    Code:
    LogFile=/var/log/zabbix/zabbix_server.log
    LogFileSize=0
    PidFile=/run/zabbix/zabbix_server.pid
    SocketDir=/run/zabbix
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=T@ngent123
    DBSocket=/var/lib/mysql/mysql.sock
    AllowUnsupportedDBVersions=1
    SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
    Timeout=4
    LogSlowQueries=3000
    StatsAllowedIP=127.0.0.1



    Thank you!
  • avlgavlg
    Junior Member
    • Aug 2019
    • 2

    #2
    I'm having the same problem.

    Zabbix 6.0.32, RHEL8.8, Mysql 8.0.32.

    Comment

    Working...