snmysqluser mismatch during upgrade from 1.5.7 to 1.5.9
-
I just upgrade a server from Ubuntu 18.04 (with fog 1.5.7) to Ubuntu 22.04 (with fog 1.5.9 dev-branch).
I used the dev-branch for the php8 compatibility (from this advise here: https://issueantenna.com/repo/fogproject/fogproject/issues/462#comment-IC_kwDOAR8IuM4_9o39 )
During the installation, it asks to create the mysql root password but it also generated a new snmysqluser|pass like this :
snmysqluser='fogstorage' snmysqlpass='xxxxxxxxxxx'
and this is where things gets weird.
Before, on 1.5.7 I had :
snmysqluser='root' snmysqlpass='' snmysqlhost='localhost'
following the upgrade to 1.5.9 my .fogsettings file has been updated to :
snmysqluser='fogmaster' # instead of 'fogstorage' snmysqlpass='YYYYYYYY' # not the same as the 'xxxx' printed out earlier snmysqlhost='localhost'
Now the question is : Should I take the user/pass from the install script, or keep the one that has been added/edited on my fogsetting file ?
-
@nono In earlier version of FOG it used the default login for mysql
root
with no password. This is a security concern, so the developers changed the code to prompt the FOG Installer for a one time use password to setroot
to. Then the fog installer creates a new user for mysql access that only has access to the fog database. The fog installer doesn’t store theroot
password once this fog db user is created.The fogmaster account is what the FOG UI uses to talk to the database internally. The fogstorage account is used for remote storage nodes to talk to the mysql database externally.
The .fogsettings file is used when you reinstall/upgrade fog so the fog installer scripts know your server specific settings.
-
thanks @george1421
But then, for the next upgrade, shall I keep the .fogsettings like it is ? or use the fogstorage (and replace it on the file) ? -
@nono The values in fogsettings should remain as the installer created them. As I said the fogstorage account is for external access to the master fog node from storage nodes. That account only has edit rights to the database, it can’t create or delete tables or schemas, that is the function of the fogmaster account. If you change it to fogstorage your next fog upgrade will fail because it doesn’t have the right access level to update tables in the fog database.