Upgrade to FOG 1.0.1- Unable to Connect to Database
-
“/[I]opt[/I]/[I]fog[/I]/[I]service[/I]/etc/config.php” checked?
-
[quote=“domii666, post: 27336, member: 24204”]“/[I]opt[/I]/[I]fog[/I]/[I]service[/I]/etc/config.php” checked?[/quote]
Since 1.0.0 and 1.0.1, we’re removed the placement of two config.php. It’s all in one location: /var/www/{fogwebdir}/commons/config.php
[quote=“GBison, post: 27335, member: 18212”]Hi all!
I recently upgraded to FOG 1.0.1 from .32 following the steps on this page:
[url]http://www.fogproject.org/wiki/index.php/Upgrade_to_1.0.0[/url]
Everything seemed to work fine as far as the installaton, but when I try to type in my FOG server address to get to the management console, it gives me a white screen with the message “Unable to Connect to Database”.
When I type in the server ip without /fog/management, I get the regular IT WORKS! screen. But it gives me no hints as to why I can’t connect to the database.
I checked the var/[URL=‘http://www…config.php’]www…config.php[/URL] file, and it seems as though the SQL username and password are the same as they were before. It never prompted me during the installation to change any settings, so I assumed it used the same variables. I also noticed that it says many of the settings were moved to the database, and must be changed within the management console. All well and good… if I could load the console.
Any suggestions? I really don’t want to have to do a clean install -.-[/quote]
How comfortable are you with linux command line?
What happens if you type:
[code]mysql -u root -p’<YOURMYSQLPASSWORD>’ -h<FOGSERVERIP> fog[/code] -
[quote=“Tom Elliott, post: 27340, member: 7271”]Since 1.0.0 and 1.0.1, we’re removed the placement of two config.php. It’s all in one location: /var/www/{fogwebdir}/commons/config.php
How comfortable are you with linux command line?
What happens if you type:
[code]mysql -u root -p’<YOURMYSQLPASSWORD>’ -h<FOGSERVERIP> fog[/code][/quote]Sorry, I’m new to this. But I’m just now installing Fog(1.0.1) on a server to try it out. I’m running it on ubuntu with the gui. I have it installed and that went well but then I’m experiencing the same thing. When I go to the link terminal tells me, I get unable to connect to database. And when I just type the ip of the server I get the “it works” page. I’m not exactly sure what to do. And where do you type the code into that you mentioned? Into terminal? Or what?
Thanks.
-
the “it works” page is the default page for apache telling you that it is running properly. the fog page relies on connection to the mysql database.
did you set a password for mysql when you installed? if so, make sure it is set in the /commons/config.php file located in the root of your web server. most likely in /var/www/fog/commons/config.php -
[quote=“Pcmasterguy, post: 27350, member: 24234”]Sorry, I’m new to this. But I’m just now installing Fog(1.0.1) on a server to try it out. I’m running it on ubuntu with the gui. I have it installed and that went well but then I’m experiencing the same thing. When I go to the link terminal tells me, I get unable to connect to database. And when I just type the ip of the server I get the “it works” page. I’m not exactly sure what to do. And where do you type the code into that you mentioned? Into terminal? Or what?
Thanks.[/quote]
Yes, in terminal or console.
-
same issue here after upgrading from 0.32 to 1.0.1
when browsing to /fog/management, I get redirected to fog/commons/schemaupdater/index.php?redir=1
which is a blank pagemysql -u root -p’’ -h192.169.0.8 fog gives access denied for user ‘root’@‘192.169.0.8’
I tried to reset the password but when i try
update user set Password=PASSWORD(‘new-password-here’) WHERE User=‘root’;
I get cannnot find fog.user?
[SIZE=12px]FOG Version 1.01[/SIZE]
[SIZE=12px]OS Version Debian Linux 2.6.32-5[/SIZE] -
tried update users set upass=password(“123”) where uName=root
which worked but no changes made (no user named root?)edit: ok so thats where the fog login is stored, not mysql login.
I reverted to an old snapshot and took alook at the settings I was using,
DB host,username and password were blank
If i try that on the 1.0.1, I am no longer redirected, however [url]http://192.168.0.8/fog/management/[/url] is still blank -
Im also having the same problem’s. I’ve reinstalled my Ubuntu about 20 times on site on Friday pulling my hair out!
Hopefully they will get this sorted asap as this was my first time using the software and Im clueless about Linux as well so having to install Ubuntu Workstation then think it was something i was doing wrong to then install Server and find the same issues. Watched the install videos over and over.
This seems to help If I run ‘sudo service mysql stop’, then ‘sudo service MySQL start’, everything works perfectly until next reboot.
-
When I type the command
[CODE]mysql -u root -p’<YOURMYSQLPASSWORD>’ -h<FOGSERVERIP> fog[/CODE]
in terminal, it asks for my password (I’m assuming SQL password, which is blank, so I just hit ENTER.
It returns withERROR 2003 (HY000): Can’t connect to MySQL server on ‘192.168.11.241’ (111)
I typically sudo commands, so I’m not used to changing to root. It’s very possible I just mistyped the command, or forgot my root password if that’s the one it’s asking for.
I remember the old section of “MYSQLPASSWORD” in one of the config.php files, but since these settings have been consolidated to elsewhere I’m not sure where to look to make sure my settings are correct as far as passwords and usernames are concerned (I’ve made a few FOG machines, so I have some trouble remembering the UN and Pass for each sometimes).
-
Also, during the install of 1.0.1 it never prompted me to type in a new MySQL password or confirm my existing one. The whole setup was automatic minus the two Y/N choices and the enter to confirm settings (which were all correct).
-
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘192.168.11.241’
That message is saying it’s not allowing connection. You may need to comment out the bind-address portion of the my.cnf file.
-
After remembering the root password for the machine, the code generated the SQL version and the listing of commands that are possible. It then listed variables below:
[CODE]Variables (–variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
auto-rehash TRUE
auto-vertical-output FALSE
character-sets-dir (No default value)
column-type-info FALSE
comments FALSE
compress FALSE
debug-check FALSE
debug-info FALSE
database (No default value)
default-character-set auto
delimiter ;
enable-cleartext-plugin FALSE
vertical FALSE
force FALSE
named-commands FALSE
ignore-spaces FALSE
init-command (No default value)
local-infile FALSE
no-beep FALSE
host 192.168.11.241
html FALSE
xml FALSE
line-numbers TRUE
unbuffered FALSE
column-names TRUE
sigint-ignore FALSE
port 3306
prompt mysql>
quick FALSE
raw FALSE
reconnect TRUE
socket /var/run/mysqld/mysqld.sock
ssl FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-verify-server-cert FALSE
table FALSE
user root
safe-updates FALSE
i-am-a-dummy FALSE
connect-timeout 0
max-allowed-packet 16777216
net-buffer-length 16384
select-limit 1000
max-join-size 1000000
secure-auth FALSE
show-warnings FALSE
plugin-dir (No default value)
default-auth (No default value)
[/CODE]And where would I find the my.cnf file you suggested?
-
Take a look here
/etc/my.cnf or /etc/mysql/my.cnfEdit:
And there is a nice command named locate.
[CODE]locate my.cnf[/CODE] -
I commented out the bind-address command which was set to the default 127.0.0.1. I restarted the mysql service and nothing changed. Went ahead and uncommented it so that I’m back to initial state.
P.S Thanks for the locate command tip
-
Fixed!
Turns out it was completely my error. In the new config.php file, it had DATABASE_USERNAME already set as root, and password blank. I assumed this was correct and pulled from the previous configuration of FOG. HOWEVER, I didn’t realize it was asking for the machine root user password and NOT the SQL password. I’m not sure if this was caused by something I did, or if the new config.php doesn’t (can’t?) update this information from a previous install.
In the var/www/fog/commons/config.php file, I typed the password for the machine’s root user in the DATABASE_PASSWORD field. My DATABASE_USERNAME was automatically filled with root. I then restarted the MySQL service and was able to log on to the management console and do the upgrade.
So, in reality my issue was with the root user credentials located in var/www/fog/commons/config.php, and NOT with the SQL creds. Again, not sure if this was my error or just how the new install pulls its info from previous builds.
In any case, give this a shot and see if it helps.
-
The config.php file IS asking for the MySQL root user password, NOT the computer root user password
i think maybe you have your passwords documented wrong, or you set the computer root password and the mySQL root password to the same thing -
That may be true, sorry for misinformation.
Like I said before, I’ve built a few of these fog servers, so I sometimes get the passwords and such mixed up between them all.
-
a bit of advice on passwords. keepass. it’s a free encrypted database designed for storing password information. i use dropbox to keep my password database synchronized across multiple machines.
-
[quote=“Reuben Bannister, post: 27439, member: 24266”]Im also having the same problem’s. I’ve reinstalled my Ubuntu about 20 times on site on Friday pulling my hair out!
Hopefully they will get this sorted asap as this was my first time using the software and Im clueless about Linux as well so having to install Ubuntu Workstation then think it was something i was doing wrong to then install Server and find the same issues. Watched the install videos over and over.
This seems to help If I run ‘sudo service mysql stop’, then ‘sudo service MySQL start’, everything works perfectly until next reboot.[/quote]
I too am having this problem and this solution works (at least temporarily).