Unable to connect to database
sushant jangale last edited by
i had problem with undionly.kpxe, so i tried Chainloading PXE to iPXE using pxelinux.0
Now i have problem, when i open website , i am getting message “unable to connect to database”
I am using fog 1.1.0 installed on ubuntu 14.
Make sure your connecting to the proper database. The file /var/www/fog/lib/fog/Config.class.php should have only 4 lines that really deal with connecting to the database server. They fall under the method db_settings.
The major ones to be aware of are:
Make sure these values are set correctly. Also verify the DATABASE_NAME is set correctly pertaining to your database (default is fog)
The USERNAME for a Server is typically root
The HOST for a server is typically 127.0.0.1 or localhost
The password is whatever you set during install time if you set one. If not it will most likely be “” or ‘’
If you’re not connecting to 127.0.0.1/localhost and actually connecting to an IP address of your fog server (e.g. 10.59.32.10) Then chances are, i’m going to guess here, you’re running ubuntu or debian derivative of some sort? Make sure the /etc/mysql/my.cnf has a commented bind-address line and if you have to change this line to make it commented (make it look like #bind-address), restart the mysql service.[code]sudo service mysql restart[/code]
Did you verify that Mysql was running?
sudo service mysql restart[/code]