Question : MYSQL - Specified Key was too long! Help!

Hi, i am trying to create a table in phpMyAdmin, and am at a loss at the error i am receiving which is as follows:

CREATE TABLE `alexremo_addo`.`products` (`id` INT(5) NOT NULL AUTO_INCREMENT PRIMARY KEY, `category_id` INT(5) NOT NULL, `product_name` VARCHAR(255) NOT NULL, `product_sku` VARCHAR(255) NOT NULL, `product_quality` VARCHAR(255) NOT NULL, `product_weight` VARCHAR(10) NOT NULL, `product_enabled` ENUM('Y', 'N') NOT NULL, `product_stocked` INT(5) NOT NULL, `product_addhome` ENUM('N', 'Y') NOT NULL, `tax_class` ENUM('None', 'Tradable Goods', 'Shipping') NOT NULL, `price` INT(7) NOT NULL, `cost` INT(7) NOT NULL, `rrp_show` ENUM('N', 'Y') NOT NULL, `rrp` INT(7) NOT NULL, `sprice_show` ENUM('N', 'Y') NOT NULL, `sprice` INT(7) NOT NULL, `short_description` TEXT NOT NULL, `long_description` TEXT NOT NULL, `keywords` VARCHAR(255) NOT NULL, `image1_label` VARCHAR(255) NOT NULL, `image1_link` VARCHAR(255) NOT NULL, `image2_label` VARCHAR(255) NOT NULL, `image2_link` VARCHAR(255) NOT NULL, `image3_label` VARCHAR(255) NOT NULL, `image3_link` VARCHAR(255) NOT NULL, `image4_label` VARCHAR(255) NOT NULL,[...]

MySQL said:

#1071 - Specified key was too long; max key length is 1000 bytes



I have read around but have had no luck so far. I will attach a pdf showing the table i am trying to create, and please can anybody shed some light on whats happening?!

Thanks Alex
Attachments:
 
table
 

Answer : MYSQL - Specified Key was too long! Help!

No, it's the size of the fields you're trying to make unique.  6 fields times 255 = 1530 characters.  If it's UTF-8, the fields could be up to 3 times larger because 1 UTF-8 character can be 3 bytes long.  Maybe you could re-examine your data and see if the field sizes can be reduced or if maybe not all of them need to be unique.
Random Solutions  
 
programming4us programming4us