Skip to content

Instantly share code, notes, and snippets.

@swikars1
Created January 8, 2025 10:45
Show Gist options
  • Select an option

  • Save swikars1/3dffad624ae32c3d353099217749847e to your computer and use it in GitHub Desktop.

Select an option

Save swikars1/3dffad624ae32c3d353099217749847e to your computer and use it in GitHub Desktop.
mysql 8 docker compose
version: "3.8"
services:
mysql:
platform: linux/x86_64 # Add this line to ensure compatibility
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: mysqldb
MYSQL_USER: swikar
MYSQL_PASSWORD: password
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment