From c4af8a7475bfad32c4a4c43eacb628ad8b89f517 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 10 Sep 2024 08:00:00 +0100 Subject: [PATCH] Setting max_allowed_packet in MariaDB --- source/_notes/22.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 source/_notes/22.md diff --git a/source/_notes/22.md b/source/_notes/22.md new file mode 100644 index 0000000..ec700f8 --- /dev/null +++ b/source/_notes/22.md @@ -0,0 +1,27 @@ +--- +title: Setting max_allowed_packet in MariaDB +date: 2024-09-10 08:51:49 +tags: [MariaDB, MySQL, Databases] +links: + - https://github.com/MariaDB/mariadb-docker/issues/467 +--- + +If you need to set `max_allowed_packet` for MariaDB, you can specify it in Docker Compose as a `command`. + +For example: + +```yaml +services: + mariadb: + image: mariadb:10.9.3 + command: --max_allowed_packet=1GB + volumes: + - "./backend_db/mariadb.storage:/var/lib/mysql" + ports: + - "3306:3306" + env_file: ./backend_db/mariadb.env +``` + +No Dockerfiles or configuration files needed. + +It can't be more than 1GB, though.