1
I’m getting the error in Mysql and don’t know how to fix it.
Below is listed the output:
code: 'ER_TOO_LONG_KEY',
errno: 1071,
sqlMessage: 'Specified key was too long; max key length is 767 bytes',
sqlState: '42000',
index: 0,
sql: 'alter table `positions` add unique `positions_name_unique`(`name`)'
}
Image of the table structure:
-> http://prntscr.com/jrdihn
The charset used is UTF-8.
Enter in the question the table structure, type, charset used etc.
– Sam
I edited the question.
– Luiz Felipe
I just tried. Unsuccessful. Same error is received.
– Luiz Felipe
Try a very low value, type name(20)
– Sam
Still doesn’t work (had changed to 10).
– Luiz Felipe
The funny thing is that on my computer it works. It is only on the server that the error exists. ._.
– Luiz Felipe
@dvd, turned out it was decreasing even... I ended up making a mistake at the time of decreasing and so I commented above. You can put the answer to mark. :)
– Luiz Felipe