Forum Moderators: coopster
MySQL / Specified key was too long; max key length is 1000 bytes
CREATE TABLE IF NOT EXISTS `feeds` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(512) character set utf8 NOT NULL,
`content` text character set utf8 NOT NULL,
`link` text character set utf8 NOT NULL,
`item_date` varchar(100) NOT NULL,
`sort_date` datetime NOT NULL,
`date_added` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `link` (`link`(255),`item_date`),
KEY `sort_date` (`sort_date`)
) ENGINE=MyISAM;
The maximum key length is 1000 bytes. This can also be changed by changing the source and recompiling.
I looked for that option in PhpMyAdmin settings to increase the byte limit..
mysql> use testdb;
mysql> show variables like "character_set_database";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| character_set_database | utf8 |
+------------------------+-------+
1 row in set (0.01 sec)
mysql> show variables like "collation_database";
+--------------------+-----------------+
| Variable_name | Value |
+--------------------+-----------------+
| collation_database | utf8_general_ci |
+--------------------+-----------------+
1 row in set (0.00 sec)