当前位置:网站首页>[MYSQL]数据同步提示:Specified key was too long;max key length is 767 bytes
[MYSQL]数据同步提示:Specified key was too long;max key length is 767 bytes
2022-06-22 15:23:00 【夜七天】
查看MYSQL版本:5.6.45
数据库字符集:utf8
排序规则:utf8_general_ci
Specified key was too long;max key length is 767 bytes
谷歌翻译:指定的密钥太长;最大密钥长度为767字节
查看资料发现是索引字段长度超限,5.6版本最大长度为767字节;
一般来说varchar或text类型设置为索引很容易出现这个问题,utf8一个字符占用3字节,若设置255长度,则为765字节;若设置长度为256,则为768字节;很容易超上限。
解决方式:
1.设置索引字段长度在255;
2.升级mysql版本;
3.将索引字段长度缩减至256以下。
边栏推荐
猜你喜欢

全球首款AR隐形眼镜,元宇宙入口这次真的打开了?

过气剧本杀,被露营“复活”

洞见科技牵头的全球「首个」IEEE隐私计算「互联互通」国际标准正式启动

【微信小程序封装底部弹出框二】

SAP ABAP BAPI-016

【小程序项目开发-- 京东商城】uni-app开发之配置tabBar & 窗口样式

CUMT study diary - quick notes of digital image processing examination

Idea installation summary

什么是 SAP ABAP? 类型、ABAP 完整形式和含义

SAP ABAP internal tables: create, read, populate, copy and delete-06
随机推荐
VHEDT业务发展框架
洞见科技牵头的全球「首个」IEEE隐私计算「互联互通」国际标准正式启动
Test for API
北京恢复堂食半月记:如何重燃门店经营烟火气
NiO uses writable events to handle the situation of one-time write incompleteness
【微信小程序封装底部弹出框】一
[deep anatomy of C language] keywords if & else & bool type
Static assertion static_ assert
jsp学习之(一)---------jsp概述
SAP ABAP 中的用户出口和客户出口-015
3.抽象類(shape)
uniapp微信小程序获取页面二维码(带有参数)
过气剧本杀,被露营“复活”
Modularity in SAP ABAP: macros, subroutines and function modules -04
Shell learning
变量
SAP ABAP 中的 Smart Forms-014
Summary of Changan chain usage skills
SAP ABAP 数据字典教程 SE11:表、锁定对象、视图和结构 -03
SAP ABAP sub screen tutorial: call sub screen -010 in SAP