首页 > 数据库 >mysql Error:index column size too large. the maximum column size is 767 bytes

mysql Error:index column size too large. the maximum column size is 767 bytes

时间:2023-03-31 12:33:46浏览次数:55  
标签:index column 767 large mysql size

问题现象

mysql在执行脚本create创建表时,提示以下错误:

index column size too large. the maximum column size is 767 bytes

异常原因

INNODB 引擎,UTF-8,主键字符串 默认最大 767,需要修改

解决方案

  1. 对数据库进行设置
    set global innodb_large_prefix = ON

参考博客

标签:index,column,767,large,mysql,size
From: https://www.cnblogs.com/ekko-w/p/17275904.html

相关文章