Index column size too large. The maximum column size is 767 bytes.
在MySQL資料庫上建立索引時,出現錯誤Index column size too large. The maximum column size is 767 bytes.
由於 MySQL Innodb 引擎表索引欄位長度的限制為 767 位元組,因此對於多位元組字符集的大欄位(或者多欄位組合索引),建立索引會出現上面的錯誤。
解決方案
Step 1 :設定引數 innodb_large_prefix 為 ON
set global innodb_file_format = BARRACUDA;
set global innodb_large_prefix = ON;
Step 2:建立表的時候指定表的 row format 格式為 Dynamic 或者 Compressed
create table tb_name
(
……
)
ROW_FORMAT=DYNAMIC ENGINE=InnoDB DEFAULT CHARSET=utf8;
Step 3:對於已經建立的表修改表的row_format
alter table <table_name> row_format=dynamic;
alter table <table_name> row_format=compressed;
經過上述步驟之後,再繼續建立索引就可以成功了。
alter table <table_name> add unique index(column_name);
相關文章
- 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- [Err] 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- Index column size too large. The maximum column size is 767 bytesIndex
- mysql specified key was too long與Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- mysql5.7 資料匯入5.6 Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- MySQL建立表失敗:Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL 5.7 到 5.6,出現 Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- mysql Index column size too large 超過767錯誤解決方案(轉)MySqlIndex
- #1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs
- ORA-28348, encryption column TDE, function indexFunctionIndex
- 高效的SQL(index values與index column values關係?)SQLIndex
- GGS ERROR 160 Bad column indexErrorIndex
- LeetCode-Maximum Size Subarray Sum Equals kLeetCode
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- TABLE size (including table,index,lob,lobindex)Index
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- Mysql 報Row size too large 65535解決方法MySql
- Row size too large (> 8126)解決辦法
- Error: no such columnError
- java.lang.IndexOutOfBoundsException: Index: 0, Size: 0JavaIndexException
- Oracle 反向索引 where index_column like '%xxx'Oracle索引Index
- 【tomcat8】consider increasing the maximum size of the cacheTomcatIDE
- 啟動Amoeba報The stack size specified is too small解決方法
- Column Monitoring
- Unhandled rejection RangeError: Maximum call stack size exceededill install loadIdealTreeErrorIdea
- 【Spring】java.lang.IndexOutOfBoundsException: Index: 256, Size: 256SpringJavaIndexException
- Size DatabaseDatabase
- Vue專案中出現:Maximum call stack size exceeded(堆疊溢位)Vue
- Hibernate 註解@Column(nullable = false) 和 @Column(unique=true)NullFalse
- CSS column-spanCSS
- CSS column-gapCSS
- CSS column-ruleCSS
- Oracle Column Group StatisticsOracle
- MAX or MIN of Indexed ColumnIndex
- [PT]Column Histogram StatisticsHistogram
- DB_BLOCK_SIZE and DB_CACHE_SIZE in OracleBloCOracle
- 關於錯誤訊息 RangeError - Maximum call stack size exceeded at XXXError