Ad Widget

Collapse

Cannot connect to the MYSQL database Ubuntu 17 32-bit Zabbix 3.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anurag
    Junior Member
    • May 2017
    • 2

    #1

    Cannot connect to the MYSQL database Ubuntu 17 32-bit Zabbix 3.2

    Hey, I'm new to zabbix & was installing it on ubuntu 17. I've tried everything but it keeps giving me the error

    Database is mysql
    also have phpmyadmin
    &php7.0 installed along with all required packages

    Cannot connect to the database.
    Details Unable to select configuration.

    Can anybody help

    Anurag
    Attached Files
  • onallion
    Senior Member
    • Mar 2016
    • 131

    #2
    Can you manually connect to the DB with those details from the server?

    Code:
    mysql -uzabbix -p zabbix
    And then enter password

    Comment

    • Akansha123
      Member
      • Jun 2016
      • 54

      #3
      Send zabbix_server configuration file for this setup

      GUI database details like DBName, DBPassword, DBUser should match zabbix_server configuration file then only it can connect to database.

      So, please send above parameters from configuration files

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        I think that the database for Zabbix was created, did you load the initial data?

        Code:
        $ mysql -uroot -p
        mysql> create database zabbix character set utf8 collate utf8_bin;
        mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<your-password>' ;
        mysql> exit
        $ cd <source-files>
        $ cd database/mysql/
        $ mysql -uroot -p zabbix < schema.sql
        $ mysql -uroot -p zabbix < images.sql
        $ mysql -uroot -p zabbix < data.sql

        Comment

        • surajhiremath
          Junior Member
          • Sep 2021
          • 3

          #5
          Have the same error, Cannot connect to database Unable to select Configuration...

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #6
            Hi surajhiremath,
            What OS and what version did you install Zabbix on? And which Zabbix version did you install? And did that method install using a package? What database do you use?
            If you can't select the DBMS you want to use in the Web Frontend Setup Wizard, you don't have the PHP modules installed to access that DBMS. Install the module according to your environment.

            Comment


            • surajhiremath
              surajhiremath commented
              Editing a comment
              Hi Atsushi, I used Ubuntu OS 20.4 version for zabbix 5.4 installation. I used MySQL database packages. I followed the steps mentioned in below link -https://www.zabbix.com/download?zabbix=5.4&os_distribution=ubuntu&os_vers ion=20.04_focal&db=mysql&ws=apache.

              I am not sure which PHP modules to install.. Could you please help ?? Perhaps share a link for it

              Thanks Atsushi
          • surajhiremath
            Junior Member
            • Sep 2021
            • 3

            #7
            Have installed PHP 7.4 but the problem still persists. Please check the attached file for error
            Attached Files

            Comment


            • Atsushi
              Atsushi commented
              Editing a comment
              I think the error occurs when a table called config doesn't exist in the database or you can't get the value from the table. Did you input the initial data after creating the database? Does the user you are using to access have access to the table?
          • surajhiremath
            Junior Member
            • Sep 2021
            • 3

            #8
            I do not have an IT background and I followed the steps mentioned by this youtuber who successfully installed Zabbix. (https://www.youtube.com/watch?v=r1RMRVVxoxU). He did not input any initial data (not atleast in the video)..

            So I am not sure why this error appears..


            Comment

            Working...