SOLVED FOG Auto Installation MYSQL issues

  • Hello Everyone!

    I am currently installing fog using my settings placed in .fogsettings found in /opt/fog/. I run the .installfog script with the -y and -S settings. I need it to install forcing HTTPS with a Mysql password for the root account. (Mysql installs during the FOG installation, I added the following line to the bottom of the .installfog script)

    mysqladmin --user=root password "newpassword" 

    Either I get the error “Updating DB… Failed” and can only connect to the page once I manually run the above mysql command. Or I get a worse error stating,

    “Compiling iPXE binaries that trust our SSL certificate… Failed!”

    In this case, I can connect to the DB, but I cannot connect to iPXE because it does not exist.

  • Moderator

    @TBuzaTechnician Just a quick update here. I finally found the time to work on this. Currently we have a major set of changes regarding database security in a testing stage. Looks pretty good so far and it will all be part of the next release.

  • @TBuzaTechnician You would need to run the mysqladmin command first, then do the command.

    That should set your mysql password and ensure FOG will install using that now set password.

    Thank you,

  • @Tom-Elliott Thanks for the help. Just to Clarify, I should Install FOG, then run:

    snmysqlpass='newpassword' ./ -y

    Which would re-run the installer to change the configuration?

  • @Sebastian-Roth, @TBuzaTechnician

    If you run mysqladm --user root password "newpassword", you should not do it as a part of the installation script (eventually yes, but as of right now no.)

    After you set the password, then you can run it with snmysqlpass='newpassword' ./ -y

    Eventually, I know we want to create a separate user and password pair for mysql for security reasons, but in the mean time, the above should work.

  • Moderator

    @TBuzaTechnician @Tom-Elliott I have started working on improving DB security in the last weeks and I have the impression that setting the DB root password simply won’t work with the install Script ad it exists right now. This is due to different behavior of the various MySQL/MariaDB versions we need to support in CentOS, Ubuntu, Debian, Fedora and so on.

    @TBuzaTechnician I am on the road right now and cannot work on this until I get back home. Feel free to play with the scripts and let us know what you find. I think using mysqladmin is a good idea because from what I have tried so far this seems to work across all versions.

  • run the installer as:

    snmysqlpass='newpassword' ./ -y