Skip to content

Instantly share code, notes, and snippets.

@orange723
Last active July 26, 2025 03:43
Show Gist options
  • Save orange723/b021ce0c07e94b4dddaf9515c8551b62 to your computer and use it in GitHub Desktop.
Save orange723/b021ce0c07e94b4dddaf9515c8551b62 to your computer and use it in GitHub Desktop.
mysql
services:
mysql:
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: 12345678
image: mysql:5.7.43
ports:
- "3306:3306"
restart: always
volumes:
- ./data:/var/lib/mysql
- ./docker.cnf:/etc/mysql/conf.d/docker.cnf
- /etc/localtime:/etc/localtime
[mysqld]
max_connections = 1024
max_connect_errors = 1000000
character_set_server = UTF8MB4
skip-host-cache
skip-name-resolve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment