---
title: "mysql导入数据时一个insert过大导致Mysql server has gone way,解决办法"
author: "AnonymMan"
date: "2014-08-28T17:33:00Z"
tags: []
categories: ["移动开发"]
slug: "mysql-insert-mysql-server-has-gone-way"
draft: false
lastmod: "2014-10-14T10:46:51Z"
id: 2138315
url: "https://anonymman.iteye.com/blog/2138315"
---

SET GLOBAL max\_allowed\_packet=104857600000000;

SET interactive\_timeout=288000000000

SET wait\_timeout=288000000000

然后导入。

最后恢复默认值：

SET GLOBAL max\_allowed\_packet=10485760;

SET interactive\_timeout=28800

SET wait\_timeout=28800