網站首頁 編程語言 正文
Specified key was too long; max key length is 767 bytes
意思是:索引太長,索引最長767
原因
系統變量innodb_large_prefix開啟了,則對于使用DYNAMIC或COMPRESSED行格式的InnoDB表,索引鍵前綴限制為3072字節。如果禁用innodb_large_prefix,不管是什么表,索引鍵前綴限制為767字節。
解決方案
- 開啟系統變量innodb_large_prefix(不建議,索引太長性能會降低)
- 將索引字段的長度減少(我們數據庫使用的是utf8mb4_bin,最多191長度(767/4))
兩者根據實際情況擇其一
原文鏈接:https://blog.csdn.net/qq_42682745/article/details/122224819
相關推薦
- 2022-07-09 C++超詳細講解auto與nullptr的使用_C 語言
- 2023-05-22 解決The?Network?Adapter?could?not?establish?the?conn
- 2022-05-25 Python中PyAutoGUI幫助文檔(推薦!)_python
- 2022-06-25 Android開發實現圖片大小與質量壓縮及保存_Android
- 2022-07-29 linux目錄管理方法介紹_linux shell
- 2022-05-24 C#多線程TPL模式下使用HttpClient_C#教程
- 2022-11-05 利用Go語言實現輕量級OpenLdap弱密碼檢測工具_Golang
- 2022-05-24 Python?3.x踩坑實戰匯總_python
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支