@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:
Create the database on your other server - e.g. named ourfogdb
Create a DB user with all rights on that DB: GRANT ALL PRIVILEGES ON ourfogdb.* TO 'theboss'@'x.x.x.x';
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.
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