Created
January 29, 2019 19:01
-
-
Save gschmutz/3443a66a4654b2493d11db23c45a7ce8 to your computer and use it in GitHub Desktop.
MySQL with an init script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql: | |
image: mysql:5.7 | |
ports: | |
- 3306:3306 | |
volumes: | |
# - ./volume/mysql:/var/lib/mysql:rw | |
- ./scripts/mysql/demo.sql:/docker-entrypoint-initdb.d/demo.sql:ro | |
environment: | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
MYSQL_DATABASE: "sample" | |
MYSQL_USER: "sample" | |
MYSQL_PASSWORD: "sample" | |
restart: always |
My issue could also be caused by the connection pool size. Could you also let me know how to set the pool size through the docker compose? Thanks, Harry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May I ask if there is a way to change the default wait_timeout? My system hits "hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection" every 8 hours or so. Somebody says its due to mysql connection idle timer kicking off. Before I found a solution on JDBC side, I need to set the idle timer longer now. Thanks in advance.