Database Schema Installer / Updater Update/Install Failed!



  • While updating from 1.1.1 to 1.2.0, I got the error. This isn’t the entire list…it actually goes to line 113.
    Please help!?!?

     
    [SIZE=6][B][FONT=Ubuntu][CENTER][SIZE=32px][COLOR=#666666]Database Schema Installer / Updater[/COLOR][/SIZE][/CENTER][/FONT][/B][/SIZE]
    
    [FONT=Ubuntu][COLOR=#555555]Update/Install Failed!
     
     
    [SIZE=5][B][CENTER][SIZE=18px][COLOR=#4c68a0]The following errors occured[/COLOR][/SIZE][/CENTER][/B][/SIZE]
    
    [B]Update ID:[/B] 1 - 0
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    CREATE DATABASE fog
     
    [B]Update ID:[/B] 1 - 1
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 2
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 3
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 4
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 5
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 6
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 7
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 8
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    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
     
    [B]Update ID:[/B] 1 - 9
    [B]Database Error:[/B]
     
     
    [B]Database SQL:[/B]
    CREATE TABLE  `fog`.`users` (
          `uId` int(11) NOT NULL auto_increment,
          `uName` varchar(40) NOT NULL,
          `uPass` varchar(50) NOT NULL,
          `uCreateDate` datetime NOT NULL,
          `uCreateBy` varchar(40) NOT NULL,
          PRIMARY KEY  (`uId`),
          KEY `new_index` (`uName`),
          KEY `new_index1` (`uPass`)
        ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1[/COLOR][/FONT]
    

    Mod edited to use code box.



  • @Wayne-Workman I can also confirm that it worked for myself too. That’s how I knew about the post and I wanted to make sure to share it.


  • Moderator

    @isaiah658 Thank you for finding this, it’s a very important bit of knowledge until FOG 1.3.0 is released.
    Tom was able to find the new link to this thread. Thanks again, @Tom-Elliott

    @econcepts Please try this.

    Here is the new link: https://forums.fogproject.org/topic/3703/fog-is-inoperable-after-server-reboot

    I only counted two or three people on the spiceworks thread that confirmed this worked, and one in the fog thread that confirmed it works. That’s more than enough to tell me that it works.

    I’m going to work on putting this information in the WiKi so that it’s more easily found and never gets buried again. I think that it’s home belongs in the “Troubleshoot MySQL” article: https://wiki.fogproject.org/wiki/index.php/Troubleshoot_MySQL



  • @econcepts Sounds like your issue is the same as what people are describing here: http://community.spiceworks.com/topic/564935-fog-database-error

    The solution that worked for them:

    Here is the post with the answer (I prefer vi to nano but I just copied the post as it was from the FOG forums) I will do this and let everyone know:

    Open up

    sudo nano /var/www/fog/lib/fog/Config.class.php
    Notate both the host, username & password

    Open up

    sudo nano /opt/fog/.fogsettings
    Fill in the following portions

    snmysqluser="{root}"

    snmysqlpass="{password if you have one}"

    snmysqlhost="{localhost}"

    Reset the mySQL database password to be what is in the config files

    run
    sudo dpkg-reconfigure mysql-server-5.5
    replace the last two numbers if using a different version of mySQL

    enter in the new password

    From that point on it should stay working after rebooting.


  • Moderator

    @econcepts said:

    someone could benefit by responding to old threads, right? Running 1.2 on Ubuntu 14.04LTS, I have to occasionally reboot because SQL becomes buggy. Open a terminal and try to log in, if you cant maybe its the same. I get the error as above weather the password is just wrong or MySQL is bugged.

    This is a known instability with Ubuntu 14.04 and FOG 1.2.0. It seems to only affect a small number of people for some reason, and it looks like you’re one of those people. The problem is sovled in the current FOG Trunk. Here is a link that guides you on installing it - should you choose to do that.

    https://wiki.fogproject.org/wiki/index.php/Upgrade_to_trunk

    Alternatively if you wish to stay on the current stable release of FOG (1.2.0), then I’d advise you to migrate to Ubuntu 12.04.

    In my opinion, I would suggest going to FOG Trunk, but it’s up to you.



  • someone could benefit by responding to old threads, right? Running 1.2 on Ubuntu 14.04LTS, I have to occasionally reboot because SQL becomes buggy. Open a terminal and try to log in, if you cant maybe its the same. I get the error as above weather the password is just wrong or MySQL is bugged.



  • Thank you Junkhacker. That took care of that problem. Now to fix the issue of my PXE timeouts…argh.


  • Developer

    yes, you should be able to find it by searching for instructions to reset the root mysql password for your linux distro



  • I found where the mysql pw is…if it isn’t correct, is there a way to recover the pw from mysql, or to create another?


  • Developer

    either mysql is not running, or the password is incorrect in [FONT=arial][COLOR=#262626]/var/www/fog/lib/fog/Config.class.php[/COLOR][/FONT]


Log in to reply
 

510
Online

39.3k
Users

11.0k
Topics

104.5k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.