FOG prompts me to update the database...



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


  • Developer

    @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.



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

  • Developer

    @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.



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



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


  • Developer

    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)?


  • Moderator

    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.


Log in to reply
 

360
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

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