When trying to create a database from an sql dump after a couple of thousand lines I would get the message "MySQL server has gone away (error 2006)"
Turns out this is common event caused by a packet being received that is larger than that set in the mysql configuration file (1MB by default when using the small, medium, large or even the huge model configuration file) This seems a little odd given that it is such a commonly reported problem. I also note that that the mysqldump maximum packet size is 16M for all models.
In addition to changing the configuration file /etc/mysql/my.cnf and signalling the running data base (kill -1), there is the option to change the value on the fly with the command set max_allowed_packet at the mysql command line.
MariaDB [(none)]> set global max_allowed_packet=16*1024*1024;
Clifford W Fulford
28 January 2016.
Copyright
© 2003-2018
Clifford W Fulford.
Fulford Consulting Ltd.
Regd. Co. 4250037 in England & Wales.
Regd. office 162, Edward Rd. Nottingham NG2 5GF, England, UK.
Related sites;
Amharic Interpreter
|
Arabic Interpreter
|
Tigrinya Interpreter
|
Joan Mary Fulford
|
Linux Training
|
Flare Support
|
Fulford Consulting Ltd.
Fulford Portal
West Bridgford Wiki
The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.