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

    FOG prompts me to update the database...

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    8
    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.
    • C
      cschwab
      last edited by Wayne Workman

      FOG prompts me to update the database when I attempt to access the server from another windows computer. It is running on Ubuntu 14.04 and works fine from that machine. I am able to log in and do what I need to do from the linux server. However, I am now unable to download the client prep files from other machines. I click the update button, and I get this:

      The following errors occured
      Update ID: 1 - 0
      
      Database Error:
      
      Database SQL:
      
      CREATE DATABASE fog
      Update ID: 1 - 1
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`groupMembers` (
      	  `gmID` int(11) NOT NULL auto_increment,
      	  `gmHostID` int(11) NOT NULL,
      	  `gmGroupID` int(11) NOT NULL,
      	  PRIMARY KEY  (`gmID`),
      	  KEY `new_index` (`gmHostID`),
      	  KEY `new_index1` (`gmGroupID`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
      Update ID: 1 - 2
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`groups` (
      	  `groupID` int(11) NOT NULL auto_increment,
      	  `groupName` varchar(50) NOT NULL,
      	  `groupDesc` longtext NOT NULL,
      	  `groupDateTime` datetime NOT NULL,
      	  `groupCreateBy` varchar(50) NOT NULL,
      	  `groupBuilding` int(11) NOT NULL,
      	  PRIMARY KEY  (`groupID`),
      	  KEY `new_index` (`groupName`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
      Update ID: 1 - 3
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`history` (
      	  `hID` int(11) NOT NULL auto_increment,
      	  `hText` longtext NOT NULL,
      	  `hUser` varchar(200) NOT NULL,
      	  `hTime` datetime NOT NULL,
      	  `hIP` varchar(50) NOT NULL,
      	  PRIMARY KEY  (`hID`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
      Update ID: 1 - 4
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`hosts` (
      	  `hostID` int(11) NOT NULL auto_increment,
      	  `hostName` varchar(16) NOT NULL,
      	  `hostDesc` longtext NOT NULL,
      	  `hostIP` varchar(25) NOT NULL,
      	  `hostImage` int(11) NOT NULL,
      	  `hostBuilding` int(11) NOT NULL,
      	  `hostCreateDate` datetime NOT NULL,
      	  `hostCreateBy` varchar(50) NOT NULL,
      	  `hostMAC` varchar(20) NOT NULL,
      	  `hostOS` int(10) unsigned NOT NULL,
      	  PRIMARY KEY  (`hostID`),
      	  KEY `new_index` (`hostName`),
      	  KEY `new_index1` (`hostIP`),
      	  KEY `new_index2` (`hostMAC`),
      	  KEY `new_index3` (`hostOS`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
      Update ID: 1 - 5
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`images` (
      	  `imageID` int(11) NOT NULL auto_increment,
      	  `imageName` varchar(40) NOT NULL,
      	  `imageDesc` longtext NOT NULL,
      	  `imagePath` longtext NOT NULL,
      	  `imageDateTime` datetime NOT NULL,
      	  `imageCreateBy` varchar(50) NOT NULL,
      	  `imageBuilding` int(11) NOT NULL,
      	  `imageSize` varchar(200) NOT NULL,
      	  PRIMARY KEY  (`imageID`),
      	  KEY `new_index` (`imageName`),
      	  KEY `new_index1` (`imageBuilding`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
      Update ID: 1 - 6
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`schemaVersion` (
      	  `vID` int(11) NOT NULL auto_increment,
      	  `vValue` int(11) NOT NULL,
      	  PRIMARY KEY  (`vID`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
      Update ID: 1 - 7
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`supportedOS` (
      	  `osID` int(10) unsigned NOT NULL auto_increment,
      	  `osName` varchar(150) NOT NULL,
      	  `osValue` int(10) unsigned NOT NULL,
      	  PRIMARY KEY  (`osID`),
      	  KEY `new_index` (`osValue`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
      Update ID: 1 - 8
      
      Database Error:
      
      Database SQL:
      
      CREATE TABLE  `fog`.`tasks` (
      	  `taskID` int(11) NOT NULL auto_increment,
      	  `taskName` varchar(250) NOT NULL,
      	  `taskCreateTime` datetime NOT NULL,
      	  `taskCheckIn` datetime NOT NULL,
      	  `taskHostID` int(11) NOT NULL,
      	  `taskState` int(11) NOT NULL,
      	  `taskCreateBy` varchar(200) NOT NULL,
      	  `taskForce` varchar(1) NOT NULL,
      	  `taskScheduledStartTime` datetime NOT NULL,
      	  `taskType` varchar(1) NOT NULL,
      	  `taskPCT` int(10) unsigned zerofill NOT NULL,
      	  PRIMARY KEY  (`taskID`),
      	  KEY `new_index` (`taskHostID`),
      	  KEY `new_index1` (`taskCheckIn`),
      	  KEY `new_index2` (`taskState`),
      	  KEY `new_index3` (`taskForce`),
      	  KEY `new_index4` (`taskType`)
      	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
      

      And this goes on for many more errors, pages worth. Any ideas? thanks.

      Mod edited to use code box.

      1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman
        last edited by Wayne Workman

        What version of FOG?

        Also - just guessing here but it would seem the DB isn’t even running, or is password protected, or was given invalid credentials for the DB during installation.

        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/

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

          said in FOG prompts me to update the database...:

          Database Error:

          Why doesn’t it print a real error message?? Anything in the apache error logs (see the signature below my message)?

          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

          C 1 Reply Last reply Reply Quote 0
          • C
            cschwab @Wayne Workman
            last edited by

            @Wayne-Workman It is password protected, but it was all correctly included in the installation process.

            1 Reply Last reply Reply Quote 0
            • C
              cschwab @Sebastian Roth
              last edited by

              @Sebastian-Roth
              I am pretty new to Linux/FOG, so I didn’t realize I should have included this:
              0_1463517858582_error.log

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

                @cschwab

                ...
                mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
                ...
                

                I guess your DB simply is not running properly. Tried restarting it and connecting via mysql command line client. You’ll find thousands of posts on the internet when searching for those terms.

                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

                L 1 Reply Last reply Reply Quote 0
                • L
                  lebrun78 @Sebastian Roth
                  last edited by

                  I have the same problem to upgrage from 0.32 to 1.2.0
                  My database works, I can connect to it in command line and list databases, tables using loging/password defined in /opt/fog/service/etc/config.php…
                  No error code in html database upgrade report :

                  Database Schema Installer / Updater
                  
                  Update/Install Failed!
                  The following errors occured
                  
                  Update ID: 1 - 0
                  
                  Database Error:
                  
                  Database SQL:
                  
                  CREATE DATABASE fog
                  
                  Update ID: 1 - 1
                  
                  Database Error:
                  
                  Database SQL:
                  
                  CREATE TABLE  `fog`.`groupMembers` (
                  	  `gmID` int(11) NOT NULL auto_increment,
                  	  `gmHostID` int(11) NOT NULL,
                  	  `gmGroupID` int(11) NOT NULL,
                  	  PRIMARY KEY  (`gmID`),
                  	  KEY `new_index` (`gmHostID`),
                  	  KEY `new_index1` (`gmGroupID`)
                  	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
                  
                  Update ID: 1 - 2
                  
                  Database Error:
                  
                  Database SQL:
                  
                  CREATE TABLE  `fog`.`groups` (
                  	  `groupID` int(11) NOT NULL auto_increment,
                  	  `groupName` varchar(50) NOT NULL,
                  	  `groupDesc` longtext NOT NULL,
                  	  `groupDateTime` datetime NOT NULL,
                  	  `groupCreateBy` varchar(50) NOT NULL,
                  	  `groupBuilding` int(11) NOT NULL,
                  	  PRIMARY KEY  (`groupID`),
                  	  KEY `new_index` (`groupName`)
                  	) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1
                  
                  Update ID: 1 - 3
                  ................
                  

                  Fog Version: Fog 1.5.10
                  Server OS: AlmaLinux release 8.8

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

                    @lebrun78 said:

                    loging/password defined in /opt/fog/service/etc/config.php

                    Well, the DB settings for FOG 1.2.0 are in /var/www/fog/lib/fog/Config.class.php or /var/www/html/fog/lib/fog/Config.class.php - depending on the OS you have installed.

                    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
                    • 1 / 1
                    • First post
                      Last post

                    152

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project