Unable to connect to database



  • Hi Everyone,

    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.

    [SIZE=6][B] [/B][/SIZE]


  • Senior Developer

    Also,

    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:
    DATABASE_HOST
    DATABASE_USERNAME
    DATABASE_PASSWORD

    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]


  • Developer

    Did you verify that Mysql was running?

    try this:
    [code]
    sudo service mysql restart[/code]


Log in to reply
 

435
Online

39.3k
Users

11.0k
Topics

104.6k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.