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

Fresh Install Debian 10, Installed fog getting "Database connection unavailable"

Scheduled Pinned Locked Moved Solved
FOG Problems
3
18
1.7k
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.
  • S
    Sebastian Roth Moderator
    last edited by Jul 26, 2019, 3:11 PM

    @MTrejo2019 Ok, this is not getting us anywhere. Give me some 20 minutes and I will spin up a Debian 10 server and try to figure this out.

    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
    • M
      MTrejo2019
      last edited by Jul 26, 2019, 3:31 PM

      Found this in the apache2 error log:

      [Thu Jul 25 15:02:43.293072 2019] [proxy_fcgi:error] [pid 4063] [client 10.10.2.58:54110] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Exception: Connection to mysql failed with message: SQLSTATE[HY000] [1049] Unknown database ‘fog’ in /var/www/html/fog/lib/db/mysqldump.class.php:282\nStack trace:\n#0 /var/www/html/fog/lib/db/mysqldump.class.php(306): Mysqldump->connect()\n#1 /var/www/html/fog/lib/fog/schema.class.php(200): Mysqldump->start(’/tmp/fog_backup…‘)\n#2 /var/www/html/fog/lib/fog/reportmaker.class.php(269): Schema->exportdb(‘fog_backup_2019…’)\n#3 /var/www/html/fog/maintenance/backup_db.php(23): ReportMaker->outputReport(3, true)\n#4 {main}\n thrown in /var/www/html/fog/lib/db/mysqldump.class.php on line 282’
      [Thu Jul 25 15:06:01.089717 2019] [mpm_prefork:notice] [pid 4060] AH00169: caught SIGTERM, shutting down

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Jul 26, 2019, 3:41 PM

        @MTrejo2019 Yes, if you re-run the installer it tries to make a backup copy of the database and because the DB fog is not created yet it fails.

        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
        • S
          Sebastian Roth Moderator
          last edited by Jul 26, 2019, 4:03 PM

          @MTrejo2019 You seem to manually have installed a different MariaDB version. Mine says Server version: 10.3.15-MariaDB-1 Debian 10

          For my version I was able to set the password the following way:

          mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY "your-password";
          mysql> FLUSH PRIVILEGES;
          

          This might not work with MariaDB >10.4. But give this a try: https://www.reddit.com/r/sysadmin/comments/avx1u6/how_to_change_the_root_password_with_mariadb_104/

          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
          • M
            MTrejo2019
            last edited by Jul 26, 2019, 4:19 PM

            That command worked. Installed db and can get into interface, will let you know it I can image soon. Thanks for the help, Moe.

            42a0f669-e071-4163-942c-91f95f3eb224-image.png

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Jul 26, 2019, 4:39 PM

              @MTrejo2019 Which one’s that? The GRANT ACCESS ...? Wouldn’t have expected that.

              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
              • M
                MTrejo2019
                last edited by Jul 26, 2019, 4:40 PM

                Boot to network and get I get asked for TFTP server. I can enter the server ip and it continues. I am using ISC DHCPd version 4.4.1.

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Jul 26, 2019, 4:45 PM

                  @MTrejo2019 Please open a new topic on this fresh issue. People will find answers more easily if we don’t discus several issues in one thread.

                  Let us know if you manually installed and configured the DHCP server as well. Post config in the new topic.

                  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
                  • M
                    MTrejo2019
                    last edited by Jul 26, 2019, 4:45 PM

                    Ok I will, ya the grant access one worked. this one:

                    mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@‘localhost’ IDENTIFIED BY “your-password”;
                    mysql> FLUSH PRIVILEGES;

                    1 Reply Last reply Reply Quote 0
                    • M
                      MTrejo2019
                      last edited by Jul 26, 2019, 4:49 PM

                      Make as solved please, I can image. Thank you for the help.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      1 / 1
                      • First post
                        18/18
                        Last post

                      172

                      Online

                      12.1k

                      Users

                      17.3k

                      Topics

                      155.3k

                      Posts
                      Copyright © 2012-2024 FOG Project