Setting up a MySQL server to avoid the "MySQL Server is gone" error

When I tried to create a MySQL database using a dump, I received the following error message

ERROR 2006 (HY000) at line 312: MySQL server has gone away

After extensive Googling (and searching in this forum), I found that I needed to increase max_allowed_packetin file my.ini. I tried various values ​​(including very large values) for this parameter, but I can not get rid of this error.

Even if I specify the -max_allowed-packet option on the command line (as indicated below), use

C:\Users\Panora>mysql --user=root --password=root --max-allowed-packet=600M db < dump.sql
ERROR 2006 (HY000) at line 50973: MySQL server has gone away

I tried to create a dump file using the following command, still not using

mysqldump --opt --skip-extended-insert --max_allowed_packet=10M --user=root --password=root db > dump.sql

Please let me know what I'm really missing.

+5
source share
2

, , , my.ini.

my.ini(MySQL V5.5 Windows Vista), , HIDDEN ( ) :

C:\ProgramData\MySQL\MySQL Server 5.5\my.ini

( , , ProgramData)

+6

Linux, : "C:\Users\Panora", mysql.ini. , ? - ?

mysql , start/run/services.msc

0

All Articles