Ad Widget

Collapse

Zabbix Fresh Deploy | Cannot connect to the mySQL DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • endeavorjay
    Junior Member
    • Nov 2024
    • 2

    #1

    Zabbix Fresh Deploy | Cannot connect to the mySQL DB

    Hi,

    I am setting up Zabbix on Ubuntu 24.04 Noble. I am at the step of being able to access the Zabbix web interface over TCP port 80, but I cannot get past the "Configure DB connection" step. I have validated that the username/password works logging into the mysql DB using the command "sudo mysql -u zabbix -p". I have executed all commands within the setup guy.

    At first (and may still be), I read forums already online regarding a potential mySQL socket issue. I ran the below command to identify my socket for mySQL server.

    mysql> SHOW VARIABLES LIKE 'socket';
    +---------------+-----------------------------+
    | Variable_name | Value |
    +---------------+-----------------------------+
    | socket | /var/run/mysqld/mysqld.sock

    I then updated this socket path in my '/etc/zabbiz/zabbix_server.conf' file in the DBSocket= field. I also already updated my 'mysqli.default_socket = ' value to the above socket path in my VM's "/etc/php/8.3/apache2/php.ini".

    I restarted all services, and I'm still not able to configure a DB connection.

    May someone please help me troubleshoot and correct this? I'm willing to do a Teams or Zoom call too.

    Kind Regards,

    Jay
  • endeavorjay
    Junior Member
    • Nov 2024
    • 2

    #2
    Donkey,

    I did splat it and started over from a fresh install - this time running nginx as the backend. I ran into the same issue.

    I tried running the above command provided. I got the following output.

    root@scsd-zabbix:/home/zabbixadmin# sudo grep \$DB /etc/zabbix/web/zabbix.conf.php
    grep: /etc/zabbix/web/zabbix.conf.php: No such file or directory

    Do you have any other tips? I tried following this guide to the letter to that someone on the internet sent me this go around, and it still is stuck at the cannot connect to the DB.

    Zabbix 7 LTS is here, and its been a while since I checked out the Zabbix Platform and wanted to see the improvements they have made. Specifically one of the more popular and touted features of version 7 is the Web Synthetic monitoring, RUM type features. I have used other


    Trying to run: Zabbix 7.0.6 (revision c1d7a081969)

    Running mysqld 8.0.40-0ubuntu0.24.04.1

    No errors in the below two paths as I try to login/connect to the database.

    /var/log/zabbix/zabbix_server.log

    /var/log/mysql/error.log​

    Database version from zabbix_serverlog:

    16035:20241126:193239.317 using configuration file: /etc/zabbix/zabbix_server.conf
    16035:20241126:193239.334 current database version (mandatory/optional): 07000000/07000015
    16035:20241126:193239.334 required mandatory version: 07000000

    Thanks,

    Jay

    Comment

    Working...