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

Database Schema Installer/ Updater

Scheduled Pinned Locked Moved Solved
Linux Problems
3
14
4.3k
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.
  • T
    templink
    last edited by Mar 14, 2017, 12:57 PM

    Server
    • FOG Version: 1.3.5 RC 13
    • OS: Ubuntu 16.04
    Client
    • Service Version:
    • OS:
    Description

    Just upgraded from Ubuntu 14.04 to 16.04 and updated FOG.
    install succeeded, except backing up database, which always failed but was not a problem.
    Now when I attempt to launch fog in Firefox on the server (localhost), I get following error message:

    Database Schema Installer / Updater
    Your database connection appears to be invalid. FOG is unable to communicate with the database. There are many reasons why this could be the case. Please check your credentials in /var/www/html/fog/lib/fog/config.class.php. Also confirm that the database is indeed running. If credentials are correct, and if the Database service is running, check to ensure your filesystem has enough space.

    I looked in the config.class.php file, but couldn’t figure out what should be changed. MySQL is running, and I have enough disk space.

    W 1 Reply Last reply Mar 14, 2017, 1:27 PM Reply Quote 0
    • T
      Tom Elliott @templink
      last edited by Mar 14, 2017, 10:27 PM

      @templink Please run:

      sudo mysql -u root
      Within mysql please run:

      ALTER USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY '';
      ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
      exit;
      

      Then you should be good to go.

      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      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

      T 1 Reply Last reply Mar 14, 2017, 11:08 PM Reply Quote 2
      • T
        Tom Elliott
        last edited by Mar 14, 2017, 12:58 PM

        Does your database have a password set for it?

        This error will present any time there’s an issue with connecting to the db. The information given there is just a quick, check these types of things too, message. Are the credentials correct?

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        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
        • T
          templink
          last edited by Mar 14, 2017, 1:00 PM

          I’ve never changed the credentials. So as far as I know, they are correct. My database has no password.

          T 1 Reply Last reply Mar 14, 2017, 1:07 PM Reply Quote 0
          • T
            Tom Elliott @templink
            last edited by Mar 14, 2017, 1:07 PM

            @templink Is there a password defined for the database in the config.class.php file?

            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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            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 @templink
              last edited by Wayne Workman Mar 14, 2017, 7:27 AM Mar 14, 2017, 1:27 PM

              @templink said in Database Schema Installer/ Updater:

              I looked in the config.class.php file, but couldn’t figure out what should be changed.

              Nothing should be changed in that file, make your changes inside of /opt/fog/.fogsettings so that they are permanent.

              Can you access the database with any of these?

              mysql -D fog
              mysql -h localhost -D fog
              mysql -h 127.0.0.1 -D fog
              mysql -h localhost -D fog -u root -p
              mysql -h 127.0.0.1 -D fog -u root -p
              

              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/

              T 1 Reply Last reply Mar 14, 2017, 6:38 PM Reply Quote 0
              • T
                templink @Wayne Workman
                last edited by Mar 14, 2017, 6:38 PM

                @Wayne-Workman
                I was able to successfully logon to the database using the first, second and fourth method you provided. Both ways using 127.0.0.1 failed though.

                T 1 Reply Last reply Mar 14, 2017, 6:39 PM Reply Quote 0
                • T
                  Tom Elliott @templink
                  last edited by Mar 14, 2017, 6:39 PM

                  @templink If you edit the config.class.php and change the
                  define('DATABASE_HOST', '127.0.0.1');

                  To read as:
                  define('DATABASE_HOST', 'localhost');

                  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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  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

                  T 1 Reply Last reply Mar 14, 2017, 6:51 PM Reply Quote 0
                  • T
                    templink @Tom Elliott
                    last edited by Mar 14, 2017, 6:51 PM

                    @Tom-Elliott
                    It read:
                    define(‘DATABASE_HOST’, ‘p:localhost’);

                    I changed it to:
                    define(DATABASE_HOST’, ‘localhost’);

                    and rebooted, but the problem persists.

                    1 Reply Last reply Reply Quote 0
                    • T
                      Tom Elliott
                      last edited by Mar 14, 2017, 7:06 PM

                      Does your config.class.php file have a defined definition for the DATABASE_PASSWORD field?

                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      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

                      T 1 Reply Last reply Mar 14, 2017, 9:09 PM Reply Quote 0
                      • T
                        templink @Tom Elliott
                        last edited by Mar 14, 2017, 9:09 PM

                        @Tom-Elliott
                        db settings from my config.class.php file:

                        private static function _dbSettings()
                        {
                        define(‘DATABASE_TYPE’, ‘mysql’); // mysql or oracle
                        define(‘DATABASE_HOST’, ‘localhost’);
                        define(‘DATABASE_NAME’, ‘fog’);
                        define(‘DATABASE_USERNAME’, ‘root’);
                        define(‘DATABASE_PASSWORD’, “”);
                        }

                        T 1 Reply Last reply Mar 14, 2017, 9:13 PM Reply Quote 0
                        • T
                          Tom Elliott @templink
                          last edited by Mar 14, 2017, 9:13 PM

                          @templink

                          What happens if you run:
                          mysql -u root fog as a “non-root” user?

                          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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                          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

                          T 1 Reply Last reply Mar 14, 2017, 9:16 PM Reply Quote 0
                          • T
                            templink @Tom Elliott
                            last edited by Mar 14, 2017, 9:16 PM

                            @Tom-Elliott

                            ubuntu@fogserver:~$ mysql -u root fog
                            ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’

                            T 1 Reply Last reply Mar 14, 2017, 10:27 PM Reply Quote 0
                            • T
                              Tom Elliott @templink
                              last edited by Mar 14, 2017, 10:27 PM

                              @templink Please run:

                              sudo mysql -u root
                              Within mysql please run:

                              ALTER USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY '';
                              ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
                              exit;
                              

                              Then you should be good to go.

                              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                              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

                              T 1 Reply Last reply Mar 14, 2017, 11:08 PM Reply Quote 2
                              • T
                                templink @Tom Elliott
                                last edited by Mar 14, 2017, 11:08 PM

                                @Tom-Elliott

                                response was
                                Query OK, 0 rows affected (0.00 sec)

                                It worked! Big thanks! I’m up and running in the browser again.

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

                                243

                                Online

                                12.0k

                                Users

                                17.3k

                                Topics

                                155.2k

                                Posts
                                Copyright © 2012-2024 FOG Project