Ad Widget

Collapse

zabbix new installation issue with mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaisim
    Junior Member
    • Oct 2019
    • 3

    #1

    zabbix new installation issue with mysql

    hello masters,

    i've just installed zabbix according to the guide:https://www.zabbix.com/download

    i have completed:
    a. Install Zabbix repository

    # rpm -Uvh https://repo.zabbix.com/zabbix/4.4/r...el8.noarch.rpm
    # dnf clean all


    b. Install Zabbix server, frontend, agent

    # dnf -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent


    however, when i start with the next step, mysql seems not working. i dont know why, would anyone please help me take a look?


    c. Create initial database

    # mysql -uroot -p
    password
    mysql> create database zabbix character set utf8 collate utf8_bin;
    mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
    mysql> quit;



    when i tried to input above, it comes this to my terminal:

    [root@localhost wang]# mysql -uroot -p
    bash: mysql: command not found...
    Failed to search for file: Cannot update read-only repo

    [root@localhost wang]# whereis mysql
    mysql: /usr/lib64/mysql /usr/share/mysql

  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by kaisim
    [root@localhost wang]# whereis mysql
    mysql: /usr/lib64/mysql /usr/share/mysql
    "whereis" command shows you entry from (s)locate database. If you need to locate command on $PATH you need to use "which" command.
    In this case you need to execute "dnf install /usr/bin/mysql".

    PS. Your issue has nothing to do with zabbix.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment


    • kaisim
      kaisim commented
      Editing a comment
      should i install mysql again by the command below?


      [root@localhost wang]# dnf install /usr/bin/mysql
      Last metadata expiration check: 0:27:56 ago on Fri 18 Oct 2019 06:55:25 PM CST.
      Dependencies resolved.
      ================================================== ================================================== =======================
      Package Arch Version Repository Size
      ================================================== ================================================== =======================
      Installing:
      mariadb x86_64 3:10.3.11-2.module_el8.0.0+35+6f2527ed AppStream 6.2 M
      Installing dependencies:
      mariadb-common x86_64 3:10.3.11-2.module_el8.0.0+35+6f2527ed AppStream 62 k
      mariadb-connector-c x86_64 3.0.7-1.el8 AppStream 148 k
      Enabling module streams:
      mariadb 10.3

      Transaction Summary
      ================================================== ================================================== =======================
      Install 3 Packages

      Total download size: 6.4 M
      Installed size: 39 M
      Is this ok [y/N]: n

    • acatic1
      acatic1 commented
      Editing a comment
      You are right, not a zabbix issue, but rather a zabbix documentation issue. Following the instructions at https://www.zabbix.com/download?zabb...ysql&ws=apache would make a normal person think that it takes care of mysql installation.

    • IntuitiveNZ
      IntuitiveNZ commented
      Editing a comment
      @acatic1: Yes, it's a documentation issue - and quite a major one!
  • gofree
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2017
    • 400

    #3
    something is wrong with your mysql installation

    yum install mysql-server

    try

    systemctl start mysqld
    systemctl status mysqld

    ps -ef | grep mysql


    MySQL, a robust and widely-used open-source relational database management system, is a cornerstone for many applications, particularly those involving web services. This comprehensive guide will help you install MySQL 8.0 on CentOS 7 or CentOS 6, ensuring a successful setup for your development or production environment. Prerequisites A CentOS 7 or CentOS 6 server Root
    Last edited by gofree; 18-10-2019, 13:22.

    Comment

    • ZaBeast
      Member
      • Sep 2019
      • 42

      #4
      You are using CentOS 8, install MariaDB:
      dnf -y install mariadb-server && systemctl start mariadb && systemctl enable mariadb

      You can find out more in this step-by-step guide:
      Use this step-by-step tutorial to install the latest Zabbix 7.0 on CentOS 9 or 8, RHEL 9 or 8, Oracle / Alma / Rocky Linux 9 or 8!

      Comment


      • kaisim
        kaisim commented
        Editing a comment
        it is working perfectly, thank you man!
    Working...