Skip to content

Instantly share code, notes, and snippets.

@oshinko
Last active March 31, 2022 09:02
Show Gist options
  • Save oshinko/63128c884dc6544099b82fffbc63f282 to your computer and use it in GitHub Desktop.
Save oshinko/63128c884dc6544099b82fffbc63f282 to your computer and use it in GitHub Desktop.
Run the MySQL sandbox container
docker run --rm -it mysql mysql -h host.docker.internal -u root -p --default-character-set=utf8 test
docker exec -it sandbox mysql -u root -p --default-character-set=utf8 test
docker run ^
--rm ^
-e MYSQL_ROOT_PASSWORD=root ^
-e MYSQL_DATABASE=test ^
-p 3306:3306 ^
--name sandbox ^
mysql:latest ^
mysqld ^
--character-set-server=utf8mb4 ^
--collation-server=utf8mb4_unicode_ci
docker run \
--rm \
-e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_DATABASE=test \
-p 3306:3306 \
--name sandbox \
mysql:latest \
mysqld \
--character-set-server=utf8mb4 \
--collation-server=utf8mb4_unicode_ci
docker stop sandbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment