Keycloak Container Ignoring Db_Addr Option
I Am Trying to Create a Docker Container for Keycloak Using a Remote Mysql Db. for Some Reason the Db_Addr Option Seem to Be Ignored During Startup and...
I am trying to create a docker container for keycloak using a remote MySQL db. For some reason the DB_ADDR option seem to be ignored during startup and Keycloak keeps trying to connect to a unexpected address and I'm getting the below error :
at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513) Caused by: java.sql.SQLException: Access denied for user 'keycloakuser'@'192.168.0.254' (using password: YES)
FATAL [org.keycloak.services] (ServerService Thread Pool -- 65) Error during startup: java.lang.RuntimeException: Failed to connect to database
Not sure where this ip address (192.168.0.254) comes from and why Keycloak is ignoring the ip address I provide with the option DB_ADDR
Here is the command I use :
docker run -p 8080:8080 -e DB_VENDOR=mysql -e DB_ADDR=<ip_address> -e DB_PORT=3306 -e DB_DATABASE=keycloakdb -e DB_USER=keycloakuser -e DB_PASSWORD=password jboss/keycloak
1 Answer
Fixed, it was a network misconfiguration on the MySQL server side. Sorry and thanks for your suggestions guys.