Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL server has gone away #11

Open
DingSoung opened this issue Aug 22, 2017 · 8 comments
Open

MySQL server has gone away #11

DingSoung opened this issue Aug 22, 2017 · 8 comments

Comments

@DingSoung
Copy link

命令
mysql> source file_name.sql;

mysql -u root -p database_name < file_name.sql
都失败了
还有别的办法没有

@kakuilan
Copy link
Owner

把mysql配置的max_allowed_packet改大点,比如
max_allowed_packet=1024M

@erdongmaqiao
Copy link

这个问题解决了么,怎么解决的啊

@ghost
Copy link

ghost commented Jun 7, 2018

hi, @elliot-cj @DingSoung
@kakuilan 所说, 在my.cnf中把max_allowed_packet改大点即可.
我在的环境是docker MySQL5.7,
使用mysql命令行输入:

set global max_allowed_packet = 200*1024*1024

重连后就可以导入了

This was referenced Apr 20, 2019
@jingyuexing
Copy link

把mysql配置的max_allowed_packet改大点,比如
max_allowed_packet=1024M

编码要不要换成UTF-8啊

@jingyuexing
Copy link

使用navicat链接本地数据库,也更改了max_allowed_packet但是从第一行就开始报错了,换到了Ubuntu系统,直接执行source 命令,也是直接报错

@jingyuexing
Copy link

已经解决了,在命令行当中执行set global max_allowed_packet = 1024*1024*1024;后就行了

@FightingFranky
Copy link

Incorrect string value: '\xA7\x94\xE4\xBC\x9A' for column 'name' at row 1 还是出现了字符串不兼容的情况

@kakuilan
Copy link
Owner

Incorrect string value: '\xA7\x94\xE4\xBC\x9A' for column 'name' at row 1 还是出现了字符串不兼容的情况

字符编码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants