[ERR] 1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.


昨天,在測試新的數據庫時,遷移表遇到了這個問題。現在記錄一下解決方案。

 1.在配置文件中添加關閉嚴格模式的配置:sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

 2.在配置文件中添加使用獨立表空間的配置:innodb_file_per_table=1

 3.在數據庫中執行:SHOW GLOBAL VARIABLES LIKE '%innodb_file%';

+--------------------------+-----------+
| Variable_name            | Value     |
+--------------------------+-----------+
| innodb_file_format       | Barracuda |
| innodb_file_format_check | ON        |
| innodb_file_format_max   | Barracuda |
+--------------------------+-----------+

  確保innodb_file_format 使用的是Barracuda,如果不是執行以下語句:SET GLOBAL innodb_file_format = barracuda;

 此時,即可解決mysql報錯1118的問題。

以下是問題圖片:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM