• 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.6k
    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

      @MTrejo2019 As I said, really ugly this DB password thing. Seems like MariaDB changed things in version 10.4 as well and this is not working as it used to.

      Please check /var/www/html/fog/lib/fog/config.class.php to see if it has the right password set in that as well. This is the config PHP is using to connect to the database.

      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

        yes it is set there also
        165f7634-7786-424f-9190-a5b79c55b776-image.png

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by

          @MTrejo2019 And you are able to login using that exact password on the mysql console?

          Please try resetting to the older authentication mechanism:

          mysql> ALTER USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY 'youpassword';
          mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
          mysql> FLUSH PRIVILEGES;
          

          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

            this error:
            13438aaa-bb8f-41cf-ab23-3ec71d374628-image.png

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @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

                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

                  @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

                    @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

                      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

                        @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

                          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

                            @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

                              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

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

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

                                232

                                Online

                                12.0k

                                Users

                                17.3k

                                Topics

                                155.2k

                                Posts
                                Copyright © 2012-2024 FOG Project