[Koha] Mysql problem

Michael Kuhn mik at adminkuhn.ch
Mon Jul 27 22:10:08 NZST 2015


Hi Ahmad

> when i want to restore koha sql file using this command
> mysql -uroot -ppasswd databaseName <koha.sql give me this error
> ERROR 2013 (HY000) at line 267: Lost connection to MySQL server during query
> i doing this command to much time before but it appear since two weeks if
> any solve can tell me.

Maybe you've got some SQL insert statements that are bigger than the 
allowed maximum size (maybe you are loading picture data?). You will 
find the parameter "max_allowed_packet" in section "mysqld" of file 
"/etc/mysql/my.cnf" - whatever size it is, increase it. For example

max_allowed_packet = 32M

In case your problem is depending on the network, increasing the timeout 
may help. The parameter here is "net_write_timeout", for more 
information see 
https://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_net_write_timeout

I hope this will help you.

Kind regards, Michael


More information about the Koha mailing list