Skip to content

Commit

Permalink
fix(mysql-setup): update default mysql collation to utf8mb4_bin (#3459)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 authored Oct 26, 2021
1 parent 8d8cdc4 commit 664bbd3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/docker-compose-without-neo4j.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
hostname: mysql
image: mysql:5.7
env_file: mysql/env/docker.env
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
ports:
- "3306:3306"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
hostname: mysql
image: mysql:5.7
env_file: mysql/env/docker.env
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
ports:
- "3306:3306"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker/mysql-setup/init.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- create datahub database
CREATE DATABASE IF NOT EXISTS DATAHUB_DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS DATAHUB_DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
USE DATAHUB_DB_NAME;

-- create metadata aspect table
Expand Down
2 changes: 1 addition & 1 deletion docker/mysql/docker-compose.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
hostname: mysql
image: mysql:5.7
env_file: env/docker.env
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
ports:
- "3306:3306"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker/mysql/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CREATE TABLE metadata_aspect_v2 (
createdby VARCHAR(255) NOT NULL,
createdfor VARCHAR(255),
CONSTRAINT pk_metadata_aspect_v2 PRIMARY KEY (urn,aspect,version)
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

INSERT INTO metadata_aspect_v2 (urn, aspect, version, metadata, createdon, createdby) VALUES(
'urn:li:corpuser:datahub',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ services:
hostname: kafka-setup
image: linkedin/datahub-kafka-setup:${DATAHUB_VERSION:-head}
mysql:
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
container_name: mysql
environment:
- MYSQL_DATABASE=datahub
Expand Down
2 changes: 1 addition & 1 deletion docker/quickstart/docker-compose.quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ services:
hostname: kafka-setup
image: linkedin/datahub-kafka-setup:${DATAHUB_VERSION:-head}
mysql:
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
container_name: mysql
environment:
- MYSQL_DATABASE=datahub
Expand Down

0 comments on commit 664bbd3

Please sign in to comment.