香港服務器導入sql文件時報錯(在執行創建表或者增加字段時,發現row size長度過長,會導致出現以下錯誤)
[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)
執行以下sql語句,查看嚴格模式是否開啟
show variables like ‘%innodb_strict_mode%’;
執行后如果為ON,則需要關閉
Variable_name Value
innodb_strict_mode ON
找到mysql的配置文件my.ini。
右鍵編輯,在[mysqld]配置項下面新增一行
[mysqld]
innodb_strict_mode=0
保存,然后重啟服務。再次執行以下sql語句,查看嚴格模式是否開啟
show variables like ‘%innodb_strict_mode%’;
如果為OFF,則說明執行成功,再導入測試正常。