MySQL error: The maximum column size is 767 bytes

前端 未结 10 1804
陌清茗
陌清茗 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:20

    I was using MariaDB version 10.1.38 and used all of the below given commands but it did not work -

    set global innodb_large_prefix = ON;
    Query OK, 0 rows affected (0.00 sec)
    
    set global innodb_file_per_table = ON;
    Query OK, 0 rows affected (0.00 sec)
    
    set global innodb_file_format = Barracuda;
    Query OK, 0 rows affected (0.00 sec)
    
    SET GLOBAL innodb_default_row_format = 'DYNAMIC';
    

    Because after you restart your MySQL (or MariaDB), these settings will not reflect back using the command at the mysql prompt: show variables like 'innodb%';

    Then I edited My.ini and added these settings in the file at below location- C:\xampp\mysql\bin\my.ini

    ## Innodb settings to bypass error of max size 737
    innodb-file-format=barracuda
    innodb-file-per-table=ON
    innodb-large-prefix=ON
    ## Above 3 didnot work so i added below
    innodb_default_row_format = 'DYNAMIC'
    

    source:https://www.experts-exchange.com/questions/28675824/Why-am-I-unable-to-turn-innodb-large-prefix-ON-successfully-Every-time-I-reboot-mySql-on-my-Ubuntu-VPS-it-resets-to-OFF.html

提交回复
热议问题