1

I have been trying for quite a while to import a large (4GB) sql dump file with the MySQL command line. I always get a "MySQL server has gone away" error at a particular line, or if I split the file into smaller chunks (about 512 MB), I get an error about the maximum allowed packet size exceeded, again around the same line. From what I have read, the solution is to change the max_allowed_packet size in my.ini to a large number and restart, but I have done so with no luck. I have also tried the import using the command line parameter, --max_allowed_packet=2147483648, no luck there either. Is there something else that I am missing here? I've exhausted all of the other forum suggestions, maybe someone has another idea I can try. Thanks,

JW

3
  • What are you trying to do,POST your method of doing Commented May 10, 2012 at 13:21
  • Regarding max_allowed_packet, you may have to set it for both the client and the server. Commented May 10, 2012 at 13:23
  • I think I did a pretty good job of describing what my issue was Ankit. If you don't have anything helpful to add, please move on. Commented May 10, 2012 at 14:46

1 Answer 1

3

Also, you have to change it for both the client and the daemon mysqld server. Change the my.cnf or my.ini file under the [mysqld] section and set max_allowed_packet=1000M or you could run these commands in a MySQL console connected to that same server:

set global net_buffer_length=1000000000; 
set global max_allowed_packet=1000000000;

Use a very large value for the packet size, because they are in bytes and then restart your MySQL server.

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

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.