Problems after upgrading Ubuntu!!



  • Hi all,

    I have been using FOG for about two years to do all of our imaging. It is installed on a Ubuntu PC. Earlier in the week, I got tired of Ubuntu’s upgrade offer popping up on the screen and since I had a couple of hours that the server would not be needed, I went ahead and upgraded Ubuntu to v. 12.04. The upgrade itself went fantastic; however upon restarting the server FOG could no longer connect to the database. It reports back with an error message along the lines of…user@localhost/fog…could not connect to the database; PASSWORD=NO.

    The person that installed the entire system two years ago is no longer with us and, other than my machine login, I have never had to enter a password to use FOG. I don’t want to do anything rash at this point, since I’ve got around 170PCs and 60+ images in my database and I would really, really hate to screw that up.

    The only experience I have with a Linux variant was 25 years ago when I worked with Xenix (XEROX’s offshoot of UNIX) for about 3 months so I’m a little rusty. Anyway, whatever help I can get is greatly appreciated.

    Ken


  • Moderator



  • [quote=“chad-bisd, post: 4941, member: 18”]play around with the trying to guess the root password.

    Try things like “password”, “fog”, and if you just can’t guess the root password. there is a way you can take the MySQL database offline and reset the root password.[/quote]

    I have tried every [U]known[/U] password that the person who set this system up has used for other things that required passwords as well as all the common generic passwords such as ‘password’ ‘pw’ ‘abc123’ etc… nothing seems to work. How do I take the Mysql database offline and reset the root password?

    Also there is no preupgrade backup of the file system.


  • Moderator

    If you have a filesystem backup of the /var/www/fog or /opt/fog/service directories from before the upgrade, restore them to a temp location and check the config.php files for the password.


  • Moderator

    play around with the trying to guess the root password.

    Try things like “password”, “fog”, and if you just can’t guess the root password. there is a way you can take the MySQL database offline and reset the root password.



  • [quote=“chad-bisd, post: 4818, member: 18”]try this from a terminal:
    [CODE]user@fog:~$ mysql -u root[/CODE]

    If you get a prompt like: “mysql>” then your root user has no password.

    If you get an error saying “ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)” then your MySQL root user now has a password. Remember what you set it to, or figure it out. Then update /var/www/fog/commons/config.php and /opt/fog/service/etc/config.php with the MySQL root user password.[/quote]

    [FONT=Ubuntu][COLOR=#000000]MYSQL -U ROOT -P RETURNS:[/COLOR][/FONT]

    [I][FONT=Ubuntu][COLOR=#000000]enter password:[/COLOR][/FONT][/I]
    [FONT=Ubuntu][COLOR=#000000]If I enter a password that I think might be correct, RETURNS:[/COLOR][/FONT]

    [FONT=Ubuntu][COLOR=#000000]error 1045 (28000): access denied for user ‘root’@‘localhost’(using password:[/COLOR][/FONT][U][FONT=Ubuntu][COLOR=#000000]YES[/COLOR][/FONT][/U][FONT=Ubuntu][COLOR=#000000])[/COLOR][/FONT]

    [FONT=Ubuntu][COLOR=#000000]If I do not enter a password, RETURNS:[/COLOR][/FONT]

    [FONT=Ubuntu][COLOR=#000000]error 1045 (28000): access denied for user ‘root’@‘localhost’(using password:[/COLOR][/FONT][U][FONT=Ubuntu][COLOR=#000000]NO[/COLOR][/FONT][/U][FONT=Ubuntu][COLOR=#000000])[/COLOR][/FONT]

    If type in “NULL” as a password, RETURNS:

    [FONT=Ubuntu][COLOR=#000000]error 1045 (28000): access denied for user ‘root’@‘localhost’(using password:[/COLOR][/FONT][U][FONT=Ubuntu][COLOR=#000000]YES[/COLOR][/FONT][/U][FONT=Ubuntu][COLOR=#000000])[/COLOR][/FONT]

    [FONT=Ubuntu][COLOR=#000000]In both /var/www/fog/commons/config.php and /opt/fog/service/etc/config.php define[/COLOR][/FONT] (“MYSQL_PASSWORD”, “”); Since I’ve noticed a couple of differences between the 2 versions of Ubuntu, I thought that maybe the new version might only recognize “NULL” and not “”, but sincetrying to use that as a password returned (using password:YES) then “” is still “” and not “NULL”.



  • /var/www/fog/commons/config.php has this entry: define (“MYSQL_PASSWORD”, “”);

    the exact msg that comes up in Firefox whenever I attempt to start fog is:

    “unable to connect to database
    Msg: Failed to connect to server:localhost server returned:access denied for user ‘root’@‘localhost’ (using password: NO)”

    After looking over the threads and thinking about the whole Ubuntu upgrade process (I was never asked to supply any “keyboard” input, just accept or reject defaults) it would seem to me that during the Upgrade Ubuntu changed the “permissions” or path for the database. Does that sound right? if so how can I change the permissions and where to change them?



  • If there was a password before then it would be listed in /var/www/fog/commons/config.php as MYSQL_PASSWORD. If there is no password listed there then I would guess that during the upgrade process you were prompted to provide a new password for mysql.



  • [quote=“chad-bisd, post: 4818, member: 18”]try this from a terminal:
    [CODE]user@fog:~$ mysql -u root[/CODE]

    If you get a prompt like: “mysql>” then your root user has no password.

    If you get an error saying “ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)” then your MySQL root user now has a password. Remember what you set it to, or figure it out. Then update /var/www/fog/commons/config.php and /opt/fog/service/etc/config.php with the MySQL root user password.[/quote]

    Followed your suggestion and I did get ERROR 1045 (28000): …

    The server, Mysql, and the FOG app were all three installed and configured over two years ago by someone who is no longer with our organization and no longer in the area, as far as I know. This person left no documentation as far as anyone knows. Is there a way to edit the password out of the database altogether?


  • Moderator

    try this from a terminal:
    [CODE]user@fog:~$ mysql -u root[/CODE]

    If you get a prompt like: “mysql>” then your root user has no password.

    If you get an error saying “ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)” then your MySQL root user now has a password. Remember what you set it to, or figure it out. Then update /var/www/fog/commons/config.php and /opt/fog/service/etc/config.php with the MySQL root user password.



  • [quote=“BryceZ, post: 4811, member: 2”]Try pulling up a terminal and running…
    [CODE]service mysql status[/CODE]
    To make sure the mysql server is actually on.

    If it spits back “mysql stop/waiting” then it’s currently off, so run…
    [CODE]sudo service mysql start[/CODE][/quote]

    responds: mysql start/running, process 1068


  • Moderator

    Did you upgrade mysql as part of the Ubuntu upgrade? If so, you may have given it a root password, which means you need to update your fog config files.



  • Try pulling up a terminal and running…
    [CODE]service mysql status[/CODE]
    To make sure the mysql server is actually on.

    If it spits back “mysql stop/waiting” then it’s currently off, so run…
    [CODE]sudo service mysql start[/CODE]



  • Yeah, I think. I open firefox just fine but when I go to “localhost/fog/management/index.php” to launch FOG, a message comes up in the browser that says:

    “unable to connect to database
    Msg: Failed to connect to server:localhost server returned:access denied for user ‘root’@‘localhost’ (using password: NO)”

    It would seem to me that in the process of upgrading Ubuntu the path to the Mysql database got changed. I looked thru the wiki but it was of no help. if I type “localhost/phpmyadmin/” into the address bar I get a 404 error on the screen. Not sure how to proceed given my nearly total noobieness with all three compenents, Ubuntu, MySql & FOG.


  • Moderator

    Is this error in the WebUI?


Log in to reply
 

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