MySQL VARCHAR(255) UTF8 is too long for key, but max length is 1000 bytes

前端 未结 3 1432
一生所求
一生所求 2021-01-31 07:34

I know there have been plenty of questions about this, but I think my math is right.

  • MySQL reserves 3 bytes per UTF8 character.
  • MyISAM allows keys of leng
3条回答
  •  时光取名叫无心
    2021-01-31 08:22

    Anyone who does need a larger key length should look at innodb_large_prefix

    visit http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_large_prefix

提交回复
热议问题