linux - increase max_allowed_packet size in mysql docker -


we using docker mysql, facing below error while running

packet query large (12884616 > 4194304). can change value on server setting max_allowed_packet' variable.; nested exception com.mysql.jdbc.packettoobigexception: packet query large (12884616 > 4194304). can change value on server setting max_allowed_packet' variable. 

now need increase max_allowed_packet size in mysql configuration, can me on docker command increase max_allowed_packet.

as argument container command:

docker run -it -e mysql_root_password=my-secret-pw mysql:5.7 --max-allowed-packet=67108864 

see "configuration without cnf file" @ https://hub.docker.com/_/mysql/, copied here posterity:

configuration without cnf file many configuration options can passed flags mysqld. give flexibility customize container without needing cnf file. example, if want change default encoding , collation tables use utf-8 (utf8mb4) run following:

$ docker run --name some-mysql -e mysql_root_password=my-secret-pw -d mysql:tag --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

if see complete list of available options, run:

$ docker run -it --rm mysql:tag --verbose --help


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -