for me using ubuntu server 18.04.03 LTS running MariaDB 10.1.41 and FOGPROJECT 1.5.7
this was the final solution
with the installation / upgrade of fogproject choose a password for mysql : type_here_your_fog_database_password
then make sure that password is the same as your mysql database:
login to mysql root with command = mysql -u root
then use following command to make passwords match fogproject
SET PASSWORD FOR ‘root’@‘localhost’ = PASSWORD(‘type_here_your_fog_database_password’);
Greetings
Jimmy