Upgrade to FOG 1.0.1- Unable to Connect to Database
-
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).