Skip to content

Instantly share code, notes, and snippets.

@tats-u
Last active September 18, 2019 13:44
Show Gist options
  • Save tats-u/a0c9c134ae6838ab0e5ae648b296a939 to your computer and use it in GitHub Desktop.
Save tats-u/a0c9c134ae6838ab0e5ae648b296a939 to your computer and use it in GitHub Desktop.
Run UTF-8 MariaDB Docker container
version: "3"
services:
db:
image: mariadb # or mysql
# Note about collations:
# utf8mb4_bin: double-width ascii chars != normal ascii chars, fast
# utf8mb4_0900_ja_as_cs (genuine MySQL 8+ only): hiragana = katakana, sorts kana chars strictly
# utf8mb4_0900_ja_as_cs_ks (genuine MySQL 8+ only): hiragana != katakana && double-with asciis = normal asciis, sorts kana chars strictly
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
ports:
- 127.0.0.1:3306:3306
environment:
MYSQL_ROOT_PASSWORD: root # Change this in production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment