Database Schema Installer/ Updater
- FOG Version: 1.3.5 RC 13
- OS: Ubuntu 16.04
- Service Version:
Just upgraded from Ubuntu 14.04 to 16.04 and updated FOG.
install succeeded, except backing up database, which always failed but was not a problem.
Now when I attempt to launch fog in Firefox on the server (localhost), I get following error message:
Database Schema Installer / Updater
Your database connection appears to be invalid. FOG is unable to communicate with the database. There are many reasons why this could be the case. Please check your credentials in /var/www/html/fog/lib/fog/config.class.php. Also confirm that the database is indeed running. If credentials are correct, and if the Database service is running, check to ensure your filesystem has enough space.
I looked in the config.class.php file, but couldn’t figure out what should be changed. MySQL is running, and I have enough disk space.
Query OK, 0 rows affected (0.00 sec)
It worked! Big thanks! I’m up and running in the browser again.
@templink Please run:
sudo mysql -u root
Within mysql please run:
ALTER USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY ''; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; exit;
Then you should be good to go.
ubuntu@fogserver:~$ mysql -u root fog
ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’
What happens if you run:
mysql -u root fogas a “non-root” user?
db settings from my config.class.php file:
private static function _dbSettings()
define(‘DATABASE_TYPE’, ‘mysql’); // mysql or oracle
Does your config.class.php file have a defined definition for the DATABASE_PASSWORD field?
I changed it to:
and rebooted, but the problem persists.
@templink If you edit the config.class.php and change the
To read as:
I was able to successfully logon to the database using the first, second and fourth method you provided. Both ways using 127.0.0.1 failed though.
I looked in the config.class.php file, but couldn’t figure out what should be changed.
Nothing should be changed in that file, make your changes inside of
/opt/fog/.fogsettingsso that they are permanent.
Can you access the database with any of these?
mysql -D fog mysql -h localhost -D fog mysql -h 127.0.0.1 -D fog mysql -h localhost -D fog -u root -p mysql -h 127.0.0.1 -D fog -u root -p
@templink Is there a password defined for the database in the config.class.php file?
I’ve never changed the credentials. So as far as I know, they are correct. My database has no password.
Does your database have a password set for it?
This error will present any time there’s an issue with connecting to the db. The information given there is just a quick, check these types of things too, message. Are the credentials correct?