SOLVED database connection not available

  • After setting up FOG with no root password on mysql within 2-3 weeks I get the message:
    ‘database connection not available’.

    Then I revert the virtual machine, before that error. To continue production.
    This is a dirty workaround for our problem.

    I have tried to setup phpmyadmin and reset the mysql password within.
    User accounts > root > Edit Privileges > Change password > {newpassword}

    hashing choice:

    • native MySql authentication.
      and tried also: unix socket based authentication.

    after that I replaced the fog settings
    sudo nano /opt/fog/.fogsettings
    snmysqlpass: ‘’{newpassword}" without the brackets…
    sudo reboot

    This didn’t fix the message ‘database connection not available’.
    Any solution?

    Ubuntu 18.04.1LTS

  • Ok.
    It seems i decided to enter no root password for mysql while running the installation, after I tried to configure a less secure root password.

    After setting a very very strong password on mysql root account (phpmyadmin).
    You have to manually edit:

    sudo nano /var/www/fog/lib/fog/Config.class.php

    In my case, for Ubuntu 18.04.1 LTS
    sudo nano /var/www/html/fog/lib/fog/Config.class.php

    private static function _dbSettings()
    enter credentials.

  • I’ve now applied the mysql lines out of topic 10006.
    Within 2-3 weeks we know of this helps. I will post an update.

  • Hi matijn,

    did you already try this?:

    We’re not on Ubuntu 18.04 yet and still running 16.04. But every time we update the OS by apt-get (doesn’t matter if upgrade or dist-upgrade) and it contains a SQL update the things described in the link above needs to be done.

    If that solves your problem and you have some sort of automatic updates turned on you could think about to deactivate them and run them regularly by yourself.

    If that doesn’t solve your problem maybe someone else has another idea.