Ubuntu is FOG's enemy

TLDR; Rerun the fog installer if you have lost “Database Connectivity” to your fog server, or run the ALTER USER syntax shown below.

So Ubuntu 16, among others I suppose, enable a “security updates” to be applied automatically as a “default” to things. Why, well it makes it simpler to ensure your Ubuntu systems are in compliance and patched for any potential exploits. This causes unknown and unexpected issues.

I figured it’d be a safe thing to express that there could be problems (as many of you have already experienced) that when these updates go up (with or without your knowledge) it can break functionality in unexpected and inopportune ways.

The quickest fix is to simply rerun the fog installer which should correct the problem.

As a note, it seems this problem is specific only when the mysql account is the 'root' user AND the password is blank.

The “fix” if you must do it manually is to open a terminal and obtain root:
Super (Windows Key) + T then sudo -i (in most cases).

It’s okay if one of them fails. This is going to fix Most people’s issues.

I would highly recommend removing the unattended-upgrades as many of these “sudden” issues came as a security patch ubuntu pushed out. By default Ubuntu typically set’s this for you as enabled and it can cause havoc on you as you (the admin) may not have “done” anything.

@haylander Typing in a password during the installer does not set a password for the database, it merely tells the fog installer ‘here, use this password to access the DB’, which won’t work if that password isn’t set prior.

I downloaded CentOS 7 and FOG 1.4.4 today, with all updates, i follow exactly all the installation steps contained in FOG Wiki, even so i have the same problem described here.

I was able to resolve the issue with the instructions in that topic, in this case, as follows:

PS: At the time of installation I did NOT leave the mysql password blank, I set a password.

sudo -i
mysql -u root
set password for 'root' @ 'localhost' = password('password entered at the time of installation fog');
set password for 'root'@'127.0.0.1' = password('password entered at the time of installation fog');
update mysql.user set plugin = 'mysql_native_password';

Hey there Canonical, you’re not doing yourself any favors when you change settings the admin has manually set. I hoped someone on your team would have read this thread and made changes accordingly to prevent the continuance of mayhem, but alas it seems nobody has… Don’t you have Google alerts setup when the words “Canonical” are used on-line?

@wanderson The alter user syntax is only a specific version of mysql and mariadb. IN the case of mariadb I believe it started with version 10.2, and for mysql it started with 5.7.

So, in your particular case, chances are the version of mariadb is not one that supports the alter user statement. That said, i only recommended the post as it seemed similar to what we’ve recently seen with CentOS 7. It does not mean this was the issue, but trying it wouldn’t hurt anything either.

The issue that brought you to this posting is most likely related to Max connections being used. I don’t know what settings will fix that for you.

@Avaryan I try not to specify a specific OS. This posting is mainly just informing users of potential issues we were/are seeing. I’m personally a fan of Fedora/Redhat/CentOS, but I try pretty hard to make our installer distro agnostic. For the most part we support the two main types found (Debian based, and Redhat based). We also support Arch.

If I had to say which one to use, I’d actually say CentOS as it’s stable, usually minimally offset from Redhat releases. Fedora would probably be the next one on the list, but in a “production” world I wouldn’t recommend it.