mysql restore fails

debrat
New Contributor III

Hello. Anyone experience a mysql database restore fail? upgrading from mysql 5.7.19 to 8 and attempting the restore of a ~2.5 GB compressed database back up. It runs for about 20 hours and then finally reaches the end and fails with the status below. The my.ini file has max_allowed packet set to 1G. It fails on both a win2012 R2 and a win2019 server using CLI Jamf server pro tools

Restoring database...
[2515.34 MB] - Processing -- MySQL dump 10.13 Distrib 5.7.19, for Win64 (x8 ...
[mysql] 2020/10/08 02:03:22 connection.go:135: write tcp [::1]:54896->[::1]:3306: wsasend: An established connection was aborted by the software in your host machine.
Error: packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server

3 REPLIES 3

cbrewer
Valued Contributor II

Have you verified that the max_allowed_packet value in my.ini is actually what mysql is currently using? Run show variables like "%max_allowed_packet%"; from a mysql command prompt. Also, I'm not sure what the jamf server tools are doing under the hood but mysqldump won't use your specified max_allowed_packet setting unless its also in the [mysqldump] part of your config file. Lastly, maybe you just need a larger max_allowed_packet value.

taochunhua
New Contributor II

@debrat Final which size , you set max_allowed_packet?

andrewmac
New Contributor

I got this error, and set my max_allowed_packet in my.ini to 16777216. After I remembered to stop and restart mysql, the import worked. :)