香港服務(wù)器導(dǎo)入SQL文件時(shí)報(bào)錯(cuò)(在執(zhí)行創(chuàng)建表或者增加字段時(shí),發(fā)現(xiàn)row size長(zhǎng)度過(guò)長(zhǎng),會(huì)導(dǎo)致出現(xiàn)以下錯(cuò)誤)
[ERR] 1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
[ERR] -- MySQL dump 10.13 Distrib 5.6.50, for Linux (x86_64)
執(zhí)行以下SQL語(yǔ)句,查看嚴(yán)格模式是否開(kāi)啟
show variables like '%innodb_strict_mode%';
執(zhí)行后如果為ON,則需要關(guān)閉
Variable_name Value
innodb_strict_mode ON
找到MySQL的配置文件my.ini。
右鍵編輯,在[mysqld]配置項(xiàng)下面新增一行
[mysqld]
innodb_strict_mode=0
保存,然后重啟服務(wù)。再次執(zhí)行以下SQL語(yǔ)句,查看嚴(yán)格模式是否開(kāi)啟
show variables like '%innodb_strict_mode%';
如果為OFF,則說(shuō)明執(zhí)行成功,再導(dǎo)入測(cè)試正常。