Is mysql running? You can typically check by running service mysqld status
If so, can you log into mysql using the credentials in config.class.php?
Grep your credentials with:grep DATABASE /var/www/html/fog/lib/fog/config.class.php
root@Fed-Fog:~# grep DATABASE /var/www/html/fog/lib/fog/config.class.php
define('DATABASE_TYPE', 'mysql'); // mysql or oracle
define('DATABASE_HOST', 'localhost');
define('DATABASE_NAME', 'fog');
define('DATABASE_USERNAME', 'fog');
define('DATABASE_PASSWORD', "password");
Test your connection with:mysql -u fog -p
root@Fed-Fog:~# mysql -u fog -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 10385683
Server version: 5.5.50-0+deb8u1 (Debian)
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]>