From 5fb4d6baee243025727769d9417fbce5646367ed Mon Sep 17 00:00:00 2001 From: blinklet Date: Wed, 8 Apr 2020 09:40:49 -0400 Subject: [PATCH] Fix mysql password error (#126) * Set mysql password earlier * Moved sql password export out of IF statement --- guac-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guac-install.sh b/guac-install.sh index 64b20f8..881e32c 100755 --- a/guac-install.sh +++ b/guac-install.sh @@ -509,7 +509,11 @@ fi systemctl enable ${TOMCAT} echo +# Set MySQL password +export MYSQL_PWD=${mysqlRootPwd} + if [ "${installMySQL}" = true ]; then + # Restart MySQL service echo -e "${BLUE}Restarting MySQL service & enable at boot...${NC}" service mysql restart @@ -572,9 +576,6 @@ if [[ "${mysqlHost}" != "localhost" ]]; then echo -e "${YELLOW}MySQL Guacamole user is set to accept login from any host, please change this for security reasons if possible.${NC}" fi -# Set MySQL password -export MYSQL_PWD=${mysqlRootPwd} - # Check for ${guacDb} already being there echo -e "${BLUE}Checking MySQL for existing database (${guacDb})${NC}" SQLCODE="