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
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 setmax_allowed_packet=1000Mor you could run these commands in a MySQL console connected to that same server:Use a very large value for the packet size, because they are in bytes and then restart your MySQL server.