• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Installation of FOG with external MySQL base

Scheduled Pinned Locked Moved
FOG Problems
2
5
560
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    Jacques-Olivier
    last edited by Jan 27, 2021, 10:12 AM

    Hi,

    We are trying to install FOG with an external MySQL base.

    We tried this command :

    snmysqlhost=‘192168.1.1’ snmysqluser=‘mypriviledgeusername’
    ./installfog.sh

    But we also need to specify our database name, how could we do that during this installation ?

    1 Reply Last reply Reply Quote 0
    • J
      Jacques-Olivier
      last edited by Jacques-Olivier Jan 27, 2021, 4:21 AM Jan 27, 2021, 10:21 AM

      Do we need to add our external database parameters befoer lanuching the installation in /etc/my.cnf ?

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Jan 27, 2021, 12:48 PM

        @Jacques-Olivier Try using mysqldbname=yourfogdbname.

        Do we need to add our external database parameters befoer lanuching the installation in /etc/my.cnf ?

        No I don’t think you need to modify the local /etc/my.cnf - though the installer will ask you for the DB root password to be able to create the FOG database and unpriviledged user for you. So you need to make sure you are able to connect to the external database over network and login as DB root user.

        I have to say that I have tested a lot when improving that part of the installer and make it more secure just before the 1.5.9 release but I never tested with a database on another host. Looking forward to hear from you if it works “out of the box”.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        J 1 Reply Last reply Jan 28, 2021, 8:20 AM Reply Quote 0
        • J
          Jacques-Olivier @Sebastian Roth
          last edited by Jacques-Olivier Jan 28, 2021, 2:24 AM Jan 28, 2021, 8:20 AM

          @sebastian-roth said in Installation of FOG with external MySQL base:

          DB root user.

          Do you mean we can’t have a priviledge root user with another name to access our external database ? For example we would like to use theboss instead of root as this priviledge user already exists.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth Jan 28, 2021, 11:57 AM Jan 28, 2021, 5:53 PM

            @jacques-olivier said in Installation of FOG with external MySQL base:

            Do you mean we can’t have a priviledge root user with another name to access our external database ? For example we would like to use theboss instead of root as this priviledge user already exists.

            The FOG installer is programmed to do all the DB user and database setup for you. It will ask your root DB password (but not store it anywhere!) just to set the user and database up for you.

            With the installer we try to help people and sometimes we have gone “too far”. I can see this is not perfect for people like you who have a custom setup and know what they are doing.

            Looking through the installer scripts I think I found a way for you to get around this:

            1. Create the database on your other server - e.g. named ourfogdb
            2. Create a DB user with all rights on that DB: GRANT ALL PRIVILEGES ON ourfogdb.* TO 'theboss'@'x.x.x.x';
            3. Create a less privileged DB user called fogstorage (sorry this is still hard coded) that would be used by external storage nodes - you might not need that but the installer will check for it, sorry.
            4. Grant access rights for the fogstorage DB user:
            GRANT SELECT ON ourfogdb.* TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.hosts TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.inventory TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.multicastSessions TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.multicastSessionsAssoc TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.nfsGroupMembers TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.tasks TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.taskStates TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.taskLog TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.snapinTasks TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.snapinJobs TO 'fogstorage'@'%' ;
            GRANT INSERT,UPDATE ON ourfogdb.imagingLog TO 'fogstorage'@'%' ;
            

            Now with that being prepared you should be able to call the FOG installer like this (untested, keeping my fingers crossed I did not overlook the obvious):

            mysqldbname='ourfogdb' snmysqlhost=‘192.168.1.1’ snmysqluser=‘theboss’ snmysqlpass='password_of_theboss_db_user' snmysqlstoragepass='password_of_the_fogstorage_db_user' ./installfog.sh

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              3/5
              Last post

            158

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project