Ad Widget

Collapse

Fresh Zabbix 7 LTS/MySQL - Cannot Connect to the Database

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ccsonetwo
    Junior Member
    • Dec 2023
    • 8

    #1

    Fresh Zabbix 7 LTS/MySQL - Cannot Connect to the Database

    Hello! Looking for any help possible here. I have a fresh install of Zabbix 7 and MySQL. I was able to follow the setup guide all the way until running setup.php (https://www.zabbix.com/download?zabb...rocky_linux&os _version=9&components=server_frontend_agent&db=mys ql&ws=apache) Step 2.F.

    No matter how I try to connect to the MySQL server it results in two different screens:
    Click image for larger version  Name:	nofiledirectory.png Views:	0 Size:	78.7 KB ID:	485045
    Click image for larger version  Name:	permdenied.png Views:	0 Size:	73.3 KB ID:	485046

    I have tried all the variations of connecting to MySQL using the mysql.sock (permissions 777, Directory permissions 755) different MySQL users (zabbix@localhost,[email protected]) and making sure the firewall is not blocking. The zabbix_server.log shows no issues with the database:

    3783:20240604:141554.207 Starting Zabbix Server. Zabbix 7.0.0 (revision 49955f1fb5c).
    3783:20240604:141554.207 ****** Enabled features ******
    3783:20240604:141554.207 SNMP monitoring: YES
    3783:20240604:141554.207 IPMI monitoring: YES
    3783:20240604:141554.207 Web monitoring: YES
    3783:20240604:141554.207 VMware monitoring: YES
    3783:20240604:141554.207 SMTP authentication: YES
    3783:20240604:141554.207 ODBC: YES
    3783:20240604:141554.207 SSH support: YES
    3783:20240604:141554.207 IPv6 support: YES
    3783:20240604:141554.207 TLS support: YES
    3783:20240604:141554.207 ******************************
    3783:20240604:141554.207 using configuration file: /etc/zabbix/zabbix_server.conf
    3783:20240604:141554.236 current database version (mandatory/optional): 07000000/07000000
    3783:20240604:141554.236 required mandatory version: 07000000
    3809:20240604:141554.267 starting HA manager
    3809:20240604:141554.278 HA manager started in active mode
    3783:20240604:141554.279 server #0 started [main process]

    I can't tell where this error is coming from. Does anyone have any idea where I could start troubleshooting this other than diving into the PHP? Any help much appreciated.

    Build:
    Zabbix 7.0 LTS
    Rocky Linux release 9.4 (Blue Onyx)
    mysql Ver 8.0.36 for Linux on x86_64 (Source distribution)
    PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS gcc x86_64 )
    Attached Files
  • Answer selected by tim.mooney at 07-06-2024, 02:26.
    markosa
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Aug 2022
    • 104

    selinux settings?

    Comment

    • ccsonetwo
      Junior Member
      • Dec 2023
      • 8

      #2
      Quick update, I tested all connections to MySQL and the logins work. zabbix@localhost has no problems logging in from console

      Comment

      • marcuspax
        Junior Member
        • Jun 2024
        • 6

        #3
        Have you checked mysqld.log?

        Comment

        • markosa
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Aug 2022
          • 104

          #4
          selinux settings?

          Comment

          • ccsonetwo
            Junior Member
            • Dec 2023
            • 8

            #5
            Thank you markosa! SELinux was enforcing unexpectedly, and I was able to connect. Much appreciated!

            Comment

            Working...