• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Mysql Default password

Scheduled Pinned Locked Moved Solved
FOG Problems
4
6
2.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    bfriconneau
    last edited by Apr 1, 2020, 8:12 AM

    Hi every body,
    I installed a fresh install of Debian 10.3. Only Debian whith SSH : No php, no MySql or MariaDB.
    I installed the last version of FOG : 1.5.8.
    During installation i type no password for MySql
    And i’ve got a problem about the access to the databases in commande line.
    So what are the default passwords of the mysql users ? : root, fog…
    Regards

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Apr 1, 2020, 4:45 PM

      @bfriconneau Unfortunately there is an issue in the 1.5.8 FOG installer setting a random root DB password which is not stored anywhere.

      There is another DB account named fogmaster which the FOG web UI is using. You will find the password for that in /var/www/html/fog/lib/fog/config.class.php

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • G
        george1421 Moderator
        last edited by Apr 1, 2020, 4:49 PM

        If the root password for mysql is lost then you will need to go through the password recovery process for mysql: https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/

        Make sure the password is set to a value. The developers were having issues with ubuntu getting cranky with no password for mysql and breaking the FOG install so with the later builds the root password is set by the FOG Admin and not recorded anywhere for security reasons. Its up to the FOG Admin to document the password elsewhere to ensure it doesn’t get lost.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Sebastian Roth Apr 1, 2020, 11:45 AM Apr 1, 2020, 5:31 PM

          As mentioned below there is a glitch in 1.5.8 on Debian 10 as well. I just spun up a test VM and did a quick recovery as the steps might vary between different systems and versions. This should work on Debian 10 with MariaDB 10.3.22 - run as root:

          systemctl stop mariadb.service
          mysqld_safe --skip-grant-tables &
          mysql -u root
          

          Now from here we are in the mysql shell and can try to change the password:

          Welcome to the MariaDB monitor.  Commands end with ; or \g.
          Your MariaDB connection id is 8
          Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10
          
          Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
          
          Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
          
          MariaDB [(none)]> select user,password,host,plugin from mysql.user;
          +------+-------------------------------------------+-----------+-----------------------+
          | user | password                                  | host      | plugin                |
          +------+-------------------------------------------+-----------+-----------------------+
          | root | *B9179FF9CF31E6DDF1DCEA4E656BCB4C5CA71943 | localhost | mysql_native_password |
          +------+-------------------------------------------+-----------+-----------------------+
          1 row in set (0.002 sec)
          
          MariaDB [(none)]> update mysql.user set password=PASSWORD("newpassword") where User='root';
          Query OK, 1 row affected (0.001 sec)
          Rows matched: 1  Changed: 1  Warnings: 0
          
          MariaDB [(none)]> update mysql.user set authentication_string=PASSWORD("newpassword") where User='root';
          Query OK, 1 row affected (0.002 sec)
          Rows matched: 1  Changed: 1  Warnings: 0
          
          MariaDB [(none)]> update mysql.user set plugin='mysql_native_password' where User='root';
          Query OK, 0 rows affected (0.002 sec)
          Rows matched: 1  Changed: 0  Warnings: 0
          
          MariaDB [(none)]> 
          MariaDB [(none)]> flush privileges;
          Query OK, 0 rows affected (0.009 sec)
          
          MariaDB [(none)]> quit
          Bye
          

          Ok, password is set! Now let’s restart the DB and test connecting as root:

          killall -15 mysqld
          systemctl start mariadb.service
          mysql -u root -p
          

          Maybe even re-set the password again using the proper tools now that you have access again because messing with the user table is not that great but as far as I know it’s the only way on this version.

          mysqladmin -u root -p password
          Enter password: 
          New password: 
          Confirm new password: 
          

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 1
          • W
            Wayne Workman
            last edited by Apr 2, 2020, 1:24 AM

            Additional information about FOG passwords for future readers: https://wiki.fogproject.org/wiki/index.php?title=Password_Central

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Apr 2, 2020, 6:56 AM

              @Wayne-Workman Thanks heaps for mentioning this here! We should really update that wiki page to help people fix this. Newer versions of MySQL/MariaDB behave very different and we have changed the old way of using an empty DB password.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              1 / 1
              • First post
                6/6
                Last post

              253

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project