MySQL errors after installing FOG

Recently, I converted a decently spec’d terminal server into an ESXi server after doing a P2V on the TS. After that, it was time to play. I installed a fresh copy of Ubuntu 9.04 server and then installed FOG. If you don’t know what FOG is, you may want to read FOG’s overview here. Once I got it all installed I kept getting an error when connecting to the web-based management interface. I have pasted in the error and resolution below, including credit on the source of the resolution.

–Himuraken

Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘root’@’localhost’ (using password: NO) in /var/www/fog/management/index.php on line 34
Unable to connect to Database

I am not sure what else to tell you from here, I am at a standstill. Thanks for any help you can offer up.

RE: Problem with mySQL database after install
By: microleaks (microleaksProject AdminAccepting Donations) – 2008-02-06 15:52
All you need to do is go to /var/www/html/fog/commons/config.php and change the mysql password in that file you match whatever you set it as.

7 thoughts on “MySQL errors after installing FOG

  1. Thank you very much! I had the same issue and this fixed in perfectly. I also read over the Fog documentation and to avoid this in the future it recommends leaving the password blank while running the installation script

  2. Awesome, …I was actually receiving a more generic error, (e.g. CANNOT CONNECT TO DATABASE). I followed these instructions and used gedit to update the MYSQL password to what I had set it to during the initial setup process.

    sudo gedit /var/www/fog/commons/config.php

    Everything works great now, ..thanks for bloggin’ 😉

  3. Thanks for posting. I saw this message of reconfiguring the config.php when i changed the password, but forgot to write it down.

Leave a Comment

eleven + 1 =