From 75977783a7ddb18c757def242cd3d5e102144346 Mon Sep 17 00:00:00 2001 From: Kare Nuorteva Date: Mon, 8 Nov 2021 20:25:56 +0200 Subject: [PATCH] load files from/to database For example: load data infile '/var/lib/mysql-files/user-id-mapping.tsv' into table data; --- custom-mysql-settings.cnf | 2 ++ docker-compose.yml | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/custom-mysql-settings.cnf b/custom-mysql-settings.cnf index 8de22b5..2b218c8 100644 --- a/custom-mysql-settings.cnf +++ b/custom-mysql-settings.cnf @@ -2,3 +2,5 @@ max_allowed_packet=32M sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION lower_case_table_names=1 +local_infile=1 +secure-file-priv= diff --git a/docker-compose.yml b/docker-compose.yml index f75d669..1a2ac6c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,6 +62,12 @@ services: target: /var/lib/mysql volume: nocopy: true + - type: bind + source: ./mysql-files + target: /var/lib/mysql-files + read_only: false + bind: + propagation: rprivate - type: bind source: ./mysql_init_scripts target: /docker-entrypoint-initdb.d @@ -833,6 +839,7 @@ networks: volumes: mysql_init_scripts: + mysql-files: cassandra_init_scripts: data-bridge-data-rabbitmq: data-bridge-data-redis: