0

I am trying to import a sqldump into a running MySQL Docker-Container with this command:

 sudo docker exec -i a2bdd4db352a /usr/bin/mysql -u username -ppassword --max_allowed_packet=1500M --default-character-set=utf8 database < /srv/Dump.sql

After a while getting these error:

ERROR 2006 (HY000) at line 979: MySQL server has gone away
read unix @->/var/run/docker.sock: read: connection reset by peer

Logs:

2017-12-07T09:44:21.099302Z 3 [Note] Aborted connection 3 to db: 'database' user: 'database' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes)

Tried to increase the max_allowed_package variable in my MySQL-Conf ---> Nothing changed - still the same error.

My Dump has a size of 16 GB.

Has anybody a idea - how to fix this?

2 Answers 2

1

Error says the particular row data has size more than 1500M, so try increasing max_allowed_packet to higher value

For detailed info refer below link http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer. The Problem was that i had increased this value but forget to comment in the special line for using my configuration in Dockerfile.
0

Do you have tried to increase the paramater --max_allowed_packet=1500M to --max_allowed_packet=200000M ?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.