Skip to content

Instantly share code, notes, and snippets.

@kmonsoor
Last active October 8, 2017 01:18
Show Gist options
  • Save kmonsoor/862e1dc71e3eb26dd569c07faaafe618 to your computer and use it in GitHub Desktop.
Save kmonsoor/862e1dc71e3eb26dd569c07faaafe618 to your computer and use it in GitHub Desktop.
mysql configuration to avoid Docker error like " Aborted connection 6 to db: 'db' user: 'root' host: '172.18.0.5' (Got an error reading communication packets)"
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
max_allowed_packet = 1073741824
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
#### after the above custom my.cnf, add this at the Dockerfile
FROM mysql:latest
COPY ./custom-mysql.cnf /etc/mysql/conf.d/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment