Ad Widget

Collapse

New Zabbix Installation - Need DB Root Password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Talderon
    Junior Member
    • Jun 2016
    • 3

    #1

    New Zabbix Installation - Need DB Root Password

    Hey all, been spending most of the day on this and can't get this working.

    Here is what I am using:

    Zabbix 4.0
    AWS t2.medium
    Ubuntu 18.04
    MySQL

    Looking at docs posted in the Zabbix Documentation to install on Ubuntu 18.04 and follow the instructions here:


    At the point of getting the DB up and running, I go here:


    The problem is, nowhere is the password exposed. Not even in the '/etc/zabbix/zabbix_server.conf' file.

    I tried blank password, also tried zabbix and even tried running 'mysql_secure_installation' in case it wasn't set up. Of course, blank password didn't work.

    How are people getting this installed? What am I missing?

    Thanks for any help!
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    By using mysql_secure_installation, I was able to set the password for root user on MySQL.
    Code:
    $ sudo mysql_secure_installation

    Comment

    • ingus.vilnis
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Mar 2014
      • 908

      #3
      DB root password is stored in the error log file of MySQL upon startup. That is the one you should use in mysql_secure_installation.
      Code:
      grep "temporary password"  /var/log/mysql/mysqld.log
      Path to the MySQL log file might differ on your OS.

      Comment

      • Talderon
        Junior Member
        • Jun 2016
        • 3

        #4
        Originally posted by Atsushi
        By using mysql_secure_installation, I was able to set the password for root user on MySQL.
        Code:
        $ sudo mysql_secure_installation
        I have tried this multiple times but this time, I was able to hit enter on the password prompt and go through the process of setting the root password. One issue, it does NOT work. When I try to log into the Database, the new password does not work. When I run the command:
        Code:
        $ sudo mysql_secure_installation
        again, the root password is blank and it lets me go through the prompts to set it again, but it does not set.

        Thanks for the help, I got further, but now a new issue cropped up.
        Last edited by Talderon; 30-10-2018, 17:59. Reason: Removed extra [/QUOTE]

        Comment


        • Atsushi
          Atsushi commented
          Editing a comment
          Have you executed sudo even when executing the mysql command?
          Also, the default security policy has been changed from the previous version.

          After executing mysql_secure_installation and setting the password of root user on MySQL, I created a user for Zabbix by the following procedure.

          $ sudo mysql -uroot -p
          mysql> set global validate_password_policy=LOW;
          mysql> create database zabbix character set utf8 collate utf8_bin;
          mysql> grant all privileges on zabbix.* to zabbix@localhost identified with mysql_native_password by 'Password0';
          mysql> quit
          $ zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
      • Talderon
        Junior Member
        • Jun 2016
        • 3

        #5
        Originally posted by ingus.vilnis
        DB root password is stored in the error log file of MySQL upon startup. That is the one you should use in mysql_secure_installation.
        Code:
        grep "temporary password" /var/log/mysql/mysqld.log
        Path to the MySQL log file might differ on your OS.
        Thanks, I did see where in some installations that this was the case, I didn't find it there.

        Comment

        Working...