Github user vchrisb commented on a diff in the pull request:
https://github.com/apache/incubator-guacamole-client/pull/10#discussion_r64999168
--- Diff: guacamole-docker/bin/start.sh ---
@@ -90,15 +90,21 @@ set_optional_property() {
## instead of a linked container.
##
associate_mysql() {
-
- # Use linked container if specified
- if [ -n "$MYSQL_NAME" ]; then
- MYSQL_HOSTNAME="$MYSQL_PORT_3306_TCP_ADDR"
- MYSQL_PORT="$MYSQL_PORT_3306_TCP_PORT"
- fi
-
- # Use default port if none specified
- MYSQL_PORT="${MYSQL_PORT-3306}"
+ : ${MYSQL_HOSTNAME:=mysql}
+ # overwrite "MYSQL_PORT" with default port if using linked container
+ if [ -n "$MYSQL_ENV_MYSQL_DATABASE" ]; then
+ MYSQL_PORT=3306
+ fi
+ # Use default port if none specified
+ : ${MYSQL_PORT:=3306}
+
+ # if we're linked to MySQL and thus have credentials already, let's use
them
+ : ${MYSQL_USER:=${MYSQL_ENV_MYSQL_USER:-root}}
--- End diff --
The mysql docker image by default does not create a `MYSQL_USER` and this
parameter is optional. See [Environmental
Variables](https://hub.docker.com/_/mysql/)
Setting the `MYSQL_USER` to `root`, if none is specified, is only happening
for linked docker images.
Not providing this fallback to `root`, for linked services, is also ok for
me.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---