Ad Widget

Collapse

Cannot connect to the database zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peyman_sh
    Junior Member
    • Dec 2019
    • 6

    #1

    Cannot connect to the database zabbix

    hi to all
    firs apologize my bad english
    please help me for resolve this problem
    i install centos 7 on vm (vmware) and install apache mariadb and config all things good
    but when connect to database error
    please help me for resolve this problem

    i think my configure database is fail bus i cant solve it
    Attached Files
  • terra
    Junior Member
    • Nov 2019
    • 4

    #2
    Hi,
    Does "mysql -h localhost -u zuser -p dbzabbix" work on the host?

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      Did you register the initial data after creating the database for Zabbix server? Zabbix will not work just by creating an empty database.

      ex.

      Comment

      • peyman_sh
        Junior Member
        • Dec 2019
        • 6

        #4
        Originally posted by terra
        Hi,
        Does "mysql -h localhost -u zuser -p dbzabbix" work on the host?
        i run this command on my host ask me password i write password correctly but access denid!!!
        Attached Files

        Comment

        • peyman_sh
          Junior Member
          • Dec 2019
          • 6

          #5
          i run this command on host . my host centos 7

          PHP Code:
            mysql -u root -use mysqlCREATE DATABASE `zabbix_db`; GRANT ALL PRIVILEGES ON `zabbix_db`.* TO `zabbix_user`@'localhost' IDENTIFIED BY 'XXXXXXXXX'FLUSH PRIVILEGES
          this time error : Error connecting to database: Access denied for user 'zuser'@'localhost' (using password: YES)
          Attached Files

          Comment

          • terra
            Junior Member
            • Nov 2019
            • 4

            #6
            Try use "127.0.0.1" instead of "localhost". That may sounds absurd but mysql is picky regarding host content on grant table.
            If that fails either, install phpmyadmin and check db's, tables and grant information.

            EDIT: 'zuser'@'localhost' and `zabbix_user`@'localhost' are not same. Try "zabbix_user" on web configuration.
            And db names also. If your db name is`zabbix_db` then use it on web configuration. Your screenshots clearly indicates that you are typing different db and user names for mysql.
            Last edited by terra; 03-12-2019, 16:42.

            Comment

            • DonPook
              Member
              • Dec 2019
              • 38

              #7
              Have you disabled Selinux? What does "getenforce" command return?

              Comment

              Working...