Database update failed 1.1.0 to 1.1.1
-
snmysqluser should be the fogstorage user on storagenodes: i.e.: StorageNodeMYSQLUSER or snmysqluser, if it’s not a node you can leave it blank OR make it root, either way it won’t hurt anything.
smysqlpass should be the fogstorage users password on storagenodes: i.e.: StorageNodeMYSQLPASS or snmysqlpass, if it’s not a node you should set this field to whatever the root password is set to OR if no password was set, leave it blank with two double quotes. -
Thanks for the reply,
I’m only doing a Normal installation for now, so I’m attempting with those settings…However the snmysqlpass field still doesn’t make sense to me - I went ahead and this to my SQL database password (that I set during initial installation) and re-ran the FOG installer and it overwrites it with a random password … so something seems wrong …
If it were using the password that I put into snmysqlpass before installation/upgrade, then why does it overwrite it?
Thanks,
D.L.edit - fixed syntax mistakes…
-
After a bunch of trial and error, I just reset the MySQL password with this command :
sudo dpkg-reconfigure mysql-server-5.5
I put this same password into .fogsettings under snmysqlpass, and also into config.php and re-ran the FOG installer.
It overwrote my password in .fogsettings with yet another randomly-generated one (I still have no idea why or where this password is actually used) but after that everything worked great!
I’m sure I just screwed something up along the way and/or entered the MySQL password incorrectly…
Thanks for the help and advice, as always,
D.L.P.S. - I did use snmysqluser=“root” and snmysqlhost=“localhost” - thanks for that info!
-
I’m aware of this bug, and it’s been fixed trunk, so next release you may have to reset values in .fogsettings one more time, but that should be it.
-
I did the upgrade to 1.1.1 and it still saying that I am not on the latest version. Also, on the main login page for the WebGUI, instead of the cloud in the upper left hand corner saying FOG 1.1.1 it says FOG 1880. then under \var\www\fog\commons I don’t have a config.php file anymore.
-
[quote=“mlnancejr8808, post: 30934, member: 654”]I did the upgrade to 1.1.1 and it still saying that I am not on the latest version. Also, on the main login page for the WebGUI, instead of the cloud in the upper left hand corner saying FOG 1.1.1 it says FOG 1880. then under \var\www\fog\commons I don’t have a config.php file anymore.[/quote]
Then you’re not running 1.1.1. You’re running SVN Version 1880.
The config file for the SVN is now located in:
/var/www/fog/lib/fog/Config.class.php -
I know this may be a stupid question, how did that happen and can i get it to where i can run 1.1.1? Will 1880 run/act differently?
-
you have installed a beta version that is newer then 1.1.1
downgrading is not supported
did you make backups? -
[quote=“mlnancejr8808, post: 30937, member: 654”]I know this may be a stupid question, how did that happen and can i get it to where i can run 1.1.1? Will 1880 run/act differently?[/quote]
Seeing as you’ve already attempted to “upgrade” I’d recommend updating to the latest where I fixed the schema update problem.
Go into the svn folder you download, probably trunk and run
[code]svn update
cd bin
./installfog.sh[/code] -
[quote=“Tom Elliott, post: 30941, member: 7271”]Seeing as you’ve already attempted to “upgrade” I’d recommend updating to the latest where I fixed the schema update problem.
Go into the svn folder you download, probably trunk and run
[code]svn update
cd bin
./installfog.sh[/code][/quote]So you don’t see the “You’re not running the latest version” message, edit the
/var/www/fog/commons/system.php file at line 30. It will read something like:
[php] define(‘FOG_VERSION’, ‘1890’);[/php]Make it read as:
[php] define(‘FOG_VERSION’, ‘1.1.1’);[/php] -
[quote=“Tom Elliott, post: 30630, member: 7271”]Could you give these a suggestions a shot?
[url]http://howterrorisminindia.blogspot.com/2013/03/error-2002-hy000-cant-connect-to-local.html[/url]Also, as you’re running svn, change your /var/www/fog/lib/fog/Config.class.php and reset the database password to ‘’ from whatever it currently is.
To fix this for future upgrades, edit the /opt/fog/.fogsettings file and set the snmysqlhost, snmysqluser, snmysqlpass properly. FOG is using the snmysqlpass to set the password for the database. It was broken in rev’s past, but I “fixed” it. One issue, though, is that this file, if exists, does not get recreated on other upgrades. So my guess is it’s got, more or less, a random password in place, which is what your db password is set to.[/quote]
This worked! thanks!
-
This is the error that I’m getting when I try to update the database:
[QUOTE]
PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150
[/QUOTE]I’m running Fog on port 8000 instead of 80 because I am already using Apache for another site. I also have a MySQL password set, but I entered that in during the setup and made sure that it shows up in the config file. I will also be using my router as the DHCP router instead of Fog.
Any help with this error?
-
[quote=“jonathan7, post: 30997, member: 24721”]This is the error that I’m getting when I try to update the database:
I’m running Fog on port 8000 instead of 80 because I am already using Apache for another site. I also have a MySQL password set, but I entered that in during the setup and made sure that it shows up in the config file. I will also be using my router as the DHCP router instead of Fog.
Any help with this error?[/quote]
what version of fog are you running?
-
This is from a fresh install of 1.1.1.
I posted in this thread because the error is related to the database update script, although it isn’t strictly related to updating the entire installation itself.
-
[quote=“jonathan7, post: 31004, member: 24721”]This is from a fresh install of 1.1.1.
I posted in this thread because the error is related to the database update script, although it isn’t strictly related to updating the entire installation itself.[/quote]
If you’re fearless, can you please try these steps? (WARNING YOU’LL BE ON TRUNK OF FOG, NOT RELEASED VERSION) I’ve addressed many problems found and added a couple features, maybe you’ll enjoy them?
[code]svn co https://svn.code/sf/net/p/freeghost/code/trunk
cd trunk/bin
sudo ./installfog.sh[/code] -
Just tried it, and I’m still getting the same error.
OS Version: Ubuntu 14.04
I deleted the /opt/fog/ folder before installing. I left the previous MySQL tables intact.
Here is the relevant part from the apache error log:
[QUOTE]
[Fri Jun 20 20:23:27.671187 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
[Fri Jun 20 20:23:27.674118 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
[Fri Jun 20 20:23:27.712777 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
[Fri Jun 20 20:23:27.757534 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Fatal error: Call to a member function save() on a non-object in /var/www/fog/commons/schemaupdater/index.php on line 1415, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
[/QUOTE]Because of the way I’ve setup the Apache virtual host, the base URL does not have the “/fog/” component in it, and it is also running off of port 8000 as I mentioned previously.
-
One thing I found that worked on my upgrade from 1.1.1 to 1.1.2 and 1.1.0 to 1.1.2 was during the install, you are asked if you set a password for the mysql database. Most people don’t set a password. If you didn’t set a password, answer YES anyway. Then when prompted for the password, just hit enter twice.
Then when you go to update the database the first time entering FOG, everything works. -
Thanks a lot for the work you guys do.
Had the database schema problem and thought I’d have to do a complete rebuild.
Used the link provided: [url]https://github.com/mastacontrola/fogproject/issues/1[/url]
Works now.
Am running Ubuntu 14.04 LTS (desktop version) and FOG 1.2.0Thanks again very much.
Fred