MySQL error: The maximum column size is 767 bytes

前端 未结 10 1788
陌清茗
陌清茗 2020-12-24 15:41

When I run a program which does something with MySQL, I got this error message:

2015-06-10 15:41:12,250 ERROR app.wsutils 419 INCRON: Error: (\'HY000\

10条回答
  •  臣服心动
    2020-12-24 16:32

    Your column that you are trying to index is too large and your settings must not be correct for innodb_large_prefix. There are a couple prerequisites parameters that also have to be set in order for innodb_large_prefix to work correctly.

    You can check to make sure that innodb_large_prefix is set by running:

    show global variables like 'innodb_lar%';

    Here are a couple prerequisites for using innodb_large_prefix:

    You need to set your global variable innodb_file_format=BARRACUDA

    to check settings run: show global variables like 'innodb_fil%';

    At the table level you have to use ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED

    for Innodb, rows are stored in COMPACT format (ROW_FORMAT=COMPACT) by default.

提交回复
热议问题