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

Database fails to initialize

Scheduled Pinned Locked Moved Solved
Bug Reports
2
6
1.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.
  • S
    syschuck
    last edited by Aug 15, 2016, 7:11 PM

    I’m having a problem with SVN Revision 5949 (version 1.3.0-RC-8) with the SQL database. For some odd reason, it’s not creating the fog database or ‘fog’ user is sql during installation. I’ve looked and look and as best I can tell the installer just never gets to mysql. The root password on mysql is blank. Eveything has been cleaned. I deleted the fog user and fog database to get a clean install. When I run the installer, everything looks fine but starting fog the firsttime jumps to http://127.0.0.1/fog/management/?node=schema with the message:

    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 the Database service is running, check to ensure your filesystem has enough space.

    I’ve checked everything, and on the mysql side, everything looks good. Phpmyadmin shows a good system with a blank root password.

    Based on what I can see, it doesn’t look like mysql is even getting run. The most frustrating part is that all of the logs look fine. mysql does get restarted by the installer, but it doesn’t show any activity like creating user fog, or tables and the like. Any help or advise would be appreciated.

    In the process of debugging this, I found a bug with sql password query in the installer. If you run mysql version 5.6 or ealier; the sql command sql=“ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘’;”

    ALTER USER’ was added in 5.7. You find this used in ./fog/lib/common/functions.sh

    I’m running Mageia 4, mysql 5.5.45 if you need to know. Thanks for the help.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Aug 15, 2016, 8:12 PM

      I’ve added code in attempt to address the issue you’ve brought here.

      Basically, I’ll only run the mysql alter user statement if the value of mysqlver (after getting it of course) is greater than 5.6 (So I’m only using maj.min portion, not the maj.min.patch in whole.)

      Also, it will only attempt the user if the snmysqlpass is blank.

      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
      • S
        syschuck
        last edited by Aug 15, 2016, 8:21 PM

        Hi Tom. You may also need to check for MariaDB as well, it used a different versioning. The ALTER USER is very new feature added to MariaDB in 10.2.0. In Mysql ALTER USER was added in 5.6.6 (not 5.7 as I said).

        T 1 Reply Last reply Aug 15, 2016, 8:38 PM Reply Quote 0
        • T
          Tom Elliott @syschuck
          last edited by Aug 15, 2016, 8:38 PM

          @syschuck As I understand it, mariadb 10.2 and mysql 5.7 is really where these things matter.

          I’ve updated the code base to hopefully address these things. (Either mysql >= 5.7 and mariadb >= 10.2)

          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
            Tom Elliott
            last edited by Aug 16, 2016, 5:43 PM

            Based on the information in this thread, I’m marking it as solved. Of course I won’t know for sure if it will work 100%, but I’m fairly sure we’ve taken the steps we need for this be addresses, at least with the limited information we have right now.

            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

            S 1 Reply Last reply Aug 16, 2016, 6:13 PM Reply Quote 0
            • S
              syschuck @Tom Elliott
              last edited by Aug 16, 2016, 6:13 PM

              @Tom-Elliott

              Awesome. I’ll give it a try on a fresh install of Mageia5 and see how it goes. I’m not sure why it wouldn’t build the database. I turned on debugging in mysql and could see that fog was restarting mysqld in the first part of the install, but when it came time to populate the database and create all of the tables and things, there was nothing. I had a previous version of fog on this system and it makes me think that there was something left-over after upgrading.

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

              247

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project