Database update failed 1.1.0 to 1.1.1
-
After using the new installer I was able to get everything working. It still appears to have blanked out the password in the config.php file.
to fix the password (if you have problems)
sudo gedit /var/www/fog/commons/config.php
find this line
define(‘DATABASE_PASSWORD’, ‘YourPasswordHere’);
Place the password in between the parenthesis after the coma.
restart apache (not sure you need to but I did)
sudo service apache2 stop
sudo service apache2 startThanks for the quick help. Fog is awesome! Tom Rocks!
-
[quote=“zeusnl, post: 30273, member: 24640”]After using the new installer I was able to get everything working. It still appears to have blanked out the password in the config.php file.
to fix the password (if you have problems)
sudo gedit /var/www/fog/commons/config.php
find this line
define(‘DATABASE_PASSWORD’, ‘YourPasswordHere’);
Place the password in between the parenthesis after the coma.
restart apache (not sure you need to but I did)
sudo service apache2 stop
sudo service apache2 start[/quote]You shouldn’t have to restart apache because you’re editing the config for the web folder, not the apache configuration.
-
i had this problem this morning again with updating from 1.1.0 to 1.1.1 i reran the install when asked Did you leave the mysql password blank during install? (Y/n) answer n
enter your sql db password
this worked for me
-
Just upgraded to 1.1.1 svn 1858 and am now having the same problem as OP.
I didn’t ever set the MySQL root password but /var/log/httpd/error_log shows this:
[CODE][Tue Jun 17 08:17:24 2014] [error] [client 10.1.10.192] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user ‘root’@‘localhost’ (using password: YES) in /var/www/html/fog/lib/db/MySQL.class.php on line 64[/CODE]
followed by a number of lines of PHP warnings … Couldn’t fetch mysqli in …There is no config.php in /var/www/fog/commons (/var/www/html/fog/commons for my installation). In addition the ipxe boot menu no longer shows up when clients boot.
FOG 1.1.1 svn 1858
CentOS 6.5
foginstall.log indicates “* Starting FOG Multicast Management Server…Failed!” -
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.
-
Brilliant!
Editing the entries in Config.class.php fixed it. I also corrected the entries in .fogsettings. I ran the installer again. The database update ran and the logs look clean.
I was not able to determine how to apply the information from the blog link to my situation. At this point everything including MySQL appears to be working as expected. It is not clear that creating a symbolic link to a MySQL socket file will solve anything for me. The instructions are written for Ubuntu but if there is a pressing reason you advise this I will work through how to translate them for use with CentOS.
Thanks
Eli
-
Ubuntu 14.04 x64
FOG 1.1.0 -> 1.1.1Hello,
I too am having this exact problem after upgrading to 1.1.1 - I have not had time to try a fresh installation yet. For testing purposes, I guess that would be the next step but it would be great to get the update to load on an existing FOG installation as well.I have tried every possible combination of settings mentioned in this thread and tried the steps from the link to the MySQL.sock page, no success…
I have never fully understood the MySQL password thing with FOG, how it has 2 SQL passwords - one main one (for the database) and one for the storage, or I don’t know? I did set a MySQL database password and I have verified that it is correct at /var/www/fog/commons/ - config.php
I checked .fogsettings and this is what I had :
snmysqluser=“”
snmysqlpass=“some random password”
snmysqlhost=“”I’ve tried removing .fogsettings and re-installing, doesn’t work. I’ve also tried every setting I can think of inside the .fogsettings file including :
snmysqluser=“fog”
snmysqluser=“root”
snmysqlhost=“127.0.0.1”
snmysqlhost=“10.10.10.10”
snmysqlpass=“old random .fogsettings password”
snmysqlpass=“new random .fogsettings password”
snmysqlpass=“SQL database password from /var/www/fog/commons/ - config.php”None of these seem to work…
Is snmysql user supposed to be “fog”, “root”, or “” - I believe that it was “” in previous versions and that worked…?
Is snmysqlpass supposed to be the database password from /var/www/fog/commons - config.php ? Or a random password generated by the FOG installer?Maybe I’m screwed because I didn’t document earlier random passwords generated by FOG? I know what I set the database password to during installation, but I’ve gone through several random passwords trying to get this to work…
Thanks for any help,
D.L. -
Please try latest SVN and update the /opt/fog/.fogsettings file to be relevant to your server.
Also, with the DB issues, I think I’ve figured out a whole bunch of things to try:
See this post:
[url]https://github.com/mastacontrola/fogproject/issues/1[/url] -
Rhythmtone- What worked for me was “root” for the user values and “localhost” for the host values. I didn’t set my SQL password so I set it to an empty string (“”). My guess is that it needs to be the one you picked for the SQL root user which is probably the one you entered in config.php
-
Thanks for the reply,
I have no idea how to use SVN, but I will look into that and figure it out.Regarding the .fogsettings file, is there any documentation on how it should be set? Excuse my lack of knowledge, but I have no idea what the settings are actually supposed to be, I’m just guessing. I can guess what the host should be (127.0.0.1 or my actual IP) but I’m not sure what the snmysqluser or snmysqlpass is supposed to be…
Especially confusing is the snmysqlpass - is that supposed to be the database password that I set? Or a random one generated by the FOG installer/configuration?
Thank you,
D.L.edit - Seen last post, will try… but I still don’t get the randomly-generated password thing, which seemed to be what worked in FOG 1.1.0…
-
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]