-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Thanks again for the great work. After running setup.sh and then running "service fleet-service status", I see the following error:
May 08 18:24:21 ubuntu fleet-service[19893]: {"mysql":"could not connect to db: Error 1049: Unknown database 'kolide', sleeping 1s","ts":"2019-05-09T01:24:21.147892244Z"}
It appears that the kolide database is not created.
Something similar to the following should work in your script:
mysql -uroot -p${MYSQL_PASS} -e "create database kolide"
Then after that, there will be another error:
May 08 18:42:35 ubuntu fleet-service[20023]: Using config file: /opt/fleet//conf/fleet.yaml
May 08 18:42:35 ubuntu fleet-service[20023]: ################################################################################
May 08 18:42:35 ubuntu fleet-service[20023]: # ERROR:
May 08 18:42:35 ubuntu fleet-service[20023]: # Your Fleet database is not initialized. Fleet cannot start up.
May 08 18:42:35 ubuntu fleet-service[20023]: #
May 08 18:42:35 ubuntu fleet-service[20023]: # Run /usr/bin/fleet prepare db to initialize the database.
May 08 18:42:35 ubuntu fleet-service[20023]: ################################################################################
Something similar to the following should work in your script:
/usr/bin/fleet prepare db --mysql_address=127.0.0.1:3306 --mysql_database=kolide --mysql_username=root --mysql_password=${MYSQL_PASS}