When I used Navicat for MySQL to import a MySQL database yesterday, a serious error occurred. Lost connection to MySQL server during query, literally, Lost connection to the MySQL server during the query.
[Msg] Decompressing...
[Msg] Table Created: wp_wiki_copy
[Msg] Importing Data...
[Msg] 2013-Lost connection to MySQL server during query
[Msg] Table Restored: wp_wiki_copy
[Msg] Finished-Stopped before completion
I have about 50 thousand data records and the size of the backup database file is 240 mb, which is compressed and indeed a little large.
It was preliminarily determined that MySQL may have crashed and the MySQL process was not stopped in the system service.
At first, the database structure was incorrect, but I used Navicat for MySQL to back up and restore the imported data. The table structure should be in the backup file and should not be a problem with the database structure.
The network environment is local. It cannot be a problem with network connections or database servers.
Finally, the solution is found in the morning, and added under the mysqld node in the my. ini configuration file
Max_allowed_packet = 500 M
That is, to configure the maximum data packet size allowed by MySQL, you can modify the data packet size as per your project, as long as it is larger than the backup file to be imported.