今天換服務(wù)器,在導(dǎo)入網(wǎng)站數(shù)據(jù)時(shí)顯示錯(cuò)誤提示:
Got a packet bigger than ‘max_allowed_packet’ bytes
replace into ……
提示意思是:導(dǎo)入的一個(gè)數(shù)據(jù)大于服務(wù)器默認(rèn)設(shè)置大小,所以我們只要修改max_allowed_packet,使其數(shù)據(jù)變大些就好了。
解決方法:
1.打開mysql的配置文件(通常是 my.cnf 或 my.ini
2.查找到max_allowed_packet(我的默認(rèn)設(shè)置是max_allowed_packet = 1M
3.把max_allowed_packet = 1M,改成max_allowed_packet = 10M
4.重啟服務(wù)器
再次導(dǎo)入數(shù)據(jù)成功
未經(jīng)允許不得轉(zhuǎn)載:445IT之家 » mysql導(dǎo)入數(shù)據(jù)顯示:Got a packet bigger than ‘max_allowed_packet’ bytes解決方法