SOLVED Database Schema Installer / Updater
- FOG Version: 1.3.4
- OS: Ubuntu 16.04.2
- Service Version:
I have been using this server for couple of months now, but this morning I get this error
Database Schema Installer / Updater
Your database connection appears to be invalid. FOG is unable to communicate with the database…
I am unable to use web gui at all.
I did restart my sql service and I did look through this thread but I don’t see anything that fixes it for me
This the status of mysql
sudo service mysql status ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en Active: active (running) since Fri 2017-04-28 07:10:55 EDT; 39s ago Process: 17807 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=e Process: 17799 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exi Main PID: 17806 (mysqld) CGroup: /system.slice/mysql.service └─17806 /usr/sbin/mysqld Apr 28 07:10:54 FOGSERV systemd: Starting MySQL Community Server... Apr 28 07:10:55 FOGSERV systemd: Started MySQL Community Server.
When I try to reset the password with
ALTER USER 'fog'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourPasswordGoesHere';
I get this error
ERROR 1396 (HY000): Operation ALTER USER failed for 'fog'@'localhost'
Any Ideas ?
@fredlwal that’s basically what a reinstall does.
@Tom-Elliott is there a way to do something like a system restore to previous settings instead of doing a reinstall?
@SOL using the ALTER?
The quickest and simplest fix is to simply re-run the fog installer.
Unfortunately I don’t have control over ubuntu’s Security update system so that’s left to the admin’s of the machines to fix.
@fredlwal instead of ‘password’ type ‘’ (basically nothing in between)
I used this as reference
@SOL how do you set the root password to blank?
I"m also getting this same issue this morning, I restarted MySQL but no luck still the same error.
@Tom-Elliott I set the root user password to blank and I am able to use web gui again. I disabled system auto updates just in case for the future.
Thanks for your help!
@SOL I’ll guarantee something changed. FOG didn’t do it, but something got updated/changed/moved what ever the case.
All you need to do is get the ALTER Command to work on your
'root'@'localhost'because if you set it pretty much default, the
'fog'@'localhost'has no bearing at all.
@Tom-Elliott I guess I am confused. Everything was working fine until today. No changes have been made. Are you saying fog was not setup properly when installed ? When I installed fog I pretty much used defaults as far as I can remember.
Is there a way to get it to work again ?
@SOL FOG, when it runs the installer, does not create a “fog” user for the DB Connectivity. It usually uses ‘root’. So unless somebody totally changed how the installer works, I have doubts that it was setup properly when you looked into a “problem”.
@Tom-Elliott I did create the user and I was able to reset its password and restarted the service but still getting same error
@Tom-Elliott I did sudo mysql before running command.
Is it possible that the fog user disappeared by itself ? It was working just fine until this morning and no one touches that server other than me. So if I create the user that should fix it ?
You have to sudo to mysql, but it seems, to me, that there is no “user” named ‘fog’ for mysql.