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', '[HY000] [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.7-rc-log]Index column size too large. The maximum column size is 767 bytes. (1709) (SQLExecDirectW)')
I Googled a little bit, and found this error might be relating to the innodb_large_prefix
option. However, I am using MySQL 5.7.7 rc, which has already set innodb_large_prefix
to be "ON" (checked in MySQL Workbench), allowing up to 3072 bytes. I am not sure if that is the problem with innodb_large_prefix
or not.
Anyway, does anyone have an idea how to fix this problem?
Just add the following options to my.cnf
Then, restart mysql server the problem will be resolved.
I had this problem because I tried to create a String primary key with varchar(254). Easy to overlook sometimes.. So double check your index type and length as well :)