Mysql Error 1089
Contents |
here for a quick overview of the site Help Center Detailed answers to any #1089 error in phpmyadmin questions you might have Meta Discuss the workings and policies
#1089 Phpmyadmin
of this site About Us Learn more about Stack Overflow the company Business Learn more about #1063 mysql hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Storage Engine Doesn't Support Unique Prefix Keys
Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up #1089 Error when creating table in phpMyAdmin up vote 1 down vote favorite 3 While creating a table I'm getting error #1089- Incorrect Prefix Key. My sql code : 1063 incorrect column specifier CREATE TABLE `buildblockz`.`db_user_info` ( `BBZUID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'User''s Id' , `username` VARCHAR(255) NOT NULL COMMENT 'User''s username' , `password` VARCHAR(255) NOT NULL COMMENT 'User''s password' , `fname` VARCHAR(255) NOT NULL COMMENT 'User''s First Name' , `mname` VARCHAR(255) NULL COMMENT 'User''s Middle Name' , `lname` VARCHAR(255) NOT NULL COMMENT 'User''s Last Name' , `line1` VARCHAR(255) NOT NULL COMMENT 'User''s Address Line 1' , `line2` VARCHAR(255) NULL COMMENT 'User''s Address Line 2' , `city` VARCHAR(255) NOT NULL COMMENT 'User''s Address City' , `state` VARCHAR(255) NOT NULL COMMENT 'User''s Address State' , `pincode` INT(11) UNSIGNED NOT NULL COMMENT 'User''s Address Pincode' , `email` VARCHAR(255) NOT NULL COMMENT 'User''s Contact Email' , `mobile` INT(11) UNSIGNED NULL COMMENT 'User''s Contact Mobile' , `phone` INT(11) UNSIGNED NULL COMMENT 'User''s Contact Phone' , `sex` ENUM('M','F','NS') NOT NULL COMMENT 'User''s Sex' , `dateOfBirth` DATE NOT NULL COMMENT 'User''s Date of Birth' , `designation` VARCHAR(255) NULL COMMENT 'User''s Designation
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
#1075 Incorrect Table Definition
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
#1075 Error In Mysql
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each foreign key phpmyadmin other. Join them; it only takes a minute: Sign up I keep getting this mysql error code #1089 up vote 8 down vote favorite 2 CREATE TABLE `movies`.`movie` ( `movie_id` INT(3) NULL AUTO_INCREMENT, `movie_name` VARCHAR(25) NULL, `movie_embedded_id` VARCHAR(50) NULL, http://stackoverflow.com/questions/30864976/1089-error-when-creating-table-in-phpmyadmin `rating_no` INT(3) NULL, `movie_description` VARCHAR(50) NULL, PRIMARY KEY (`movie_id`(3))) ENGINE = InnoDB; I keep getting this error: #1089 - Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys. but I've got no idea what it means, anyone have a clue? mysql share|improve this question edited Jul 4 at 22:36 Sevvlor 4401311 asked May 22 '15 at 21:22 tinOfBeans 82119 http://stackoverflow.com/questions/30406066/i-keep-getting-this-mysql-error-code-1089 Its probably this PRIMARY KEY (`movie_id`(3)) change it to PRIMARY KEY (`movie_id`) –dan08 May 22 '15 at 21:30 add a comment| 1 Answer 1 active oldest votes up vote 27 down vote accepted With the part PRIMARY KEY (`movie_id`(3)) you are telling mysql to create a sub part key* on the first 3 letters of movie id. This only works for string types. You need to use PRIMARY KEY (`movie_id`) without providing a length. *Is this sure the query resulting in the error? Never saw that on a primary key, its used for indexes. share|improve this answer edited May 22 '15 at 21:45 answered May 22 '15 at 21:31 dognose 11.6k52765 thank you very much, i didn't realise this was what i was requesting. –tinOfBeans May 22 '15 at 21:47 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged mysql or ask your own question. asked 1 year ago viewed 20869 times active 1 month ago Linked 0 Difficulty in creating a table in mysql database -2 mysql table c
understanding PHPMyAdmin error message The SitePoint Forums have moved. You can now find them here. This forum is now closed to new posts, but you can browse existing content. You http://www.sitepoint.com/forums/showthread.php?595931-Having-problem-understanding-PHPMyAdmin-error-message can find out more information about the move and how to open a new account (if necessary) here. If you get stuck you can get support by emailing forums@sitepoint.com If this is your first http://forums.mysql.com/read.php?25,15369,15369 visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select error in the forum that you want to visit from the selection below. SitePoint Sponsor User Tag List Results 1 to 5 of 5 Thread: Having problem understanding PHPMyAdmin error message Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jan 23, 2009,10:19 #1 StevenHu View Profile View Forum Posts SitePoint Wizard Join Date Feb 2007 Location Southern California Posts mysql error 1089 1,388 Mentioned 1 Post(s) Tagged 1 Thread(s) Having problem understanding PHPMyAdmin error message I am trying unsuccessfully to make an index of several fields from within PHPMyAdmin. (I have done so successfully with several other tables.) Here is the message. _________________________ ALTER TABLE `profiles` ADD INDEX ( `ID` ( 3 ) , `FirstName` ( 30 ) , `LastName` ( 30 ) , `ThumbPhoto` ( 30 ) ) MySQL said: #1089 - Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys _________________________ "Incorrect sub part key" - ? "the used key part isn't a string" - ? "the used length is longer than the key part" - the numbers match their varchar values. ID is tinytext, which I think means "3" "the storage engine doesn't support unique sub keys" - I'm using InnoDB. Can you give me a clue to what I need to do from here? I'm having this trouble with several tables, but no trouble with other tables. Not sure what the difference is. Thanks! Jan 23, 2009,11:40 #2 Raju Gautam View Profile View Forum Posts rajug.replace('Raju Gautam'); Join Date Oct 200
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: NDB clusters :: ERROR 1089 (HY000): New Topic Advanced Search ERROR 1089 (HY000): Posted by: Ahmed El Zein () Date: February 15, 2005 06:27AM I was trying to create a table the other day on mysql cluster, like so: CREATE TABLE test1 ( id bigint(20) unsigned NOT NULL auto_increment, fname varchar(32) NOT NULL default '', lname varchar(32) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY name_idx (fname(25),lname(25)) ) ENGINE=NDBCLUSTER; this returns an error: ERROR 1089 (HY000): Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys This works fine without "ENGINE=NDBCLUSTER" so I know it is related to the new engine!! It also works if I leave "ENGINE=NDBCLUSTER" and remove "UNIQUE". if I change (fname(25),lname(25)) to (fname(32),lname(32)) it works as well!! I think that this is not right!! what if fname was 255 or something?? Can anyone help me understand why the index must be created from all of the column width? Thanx in advance, Ahmed Navigate:Previous Message•Next Message Options:Reply•Quote Subject Views Written By Posted ERROR 1089 (HY000): 8113 Ahmed El Zein 02/15/2005 06:27AM Re: ERROR 1089 (HY000): 3791 Harrison Fisk 02/15/2005 08:10PM Sorry, you can't reply to this topic. It has been closed. powered by phorum Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party. Contact Sales USA: +1-866-221-0634 Canada: +1-866-221-0634 Germany: +49 89 143 01280 France: +33 1 57 60 83 57 Italy: +39 02 249 59 120 UK: +44 207 553 8447 Japan: 0120-065556 China: 10800-811-0823 India: 0008001005870 More Countries» Contact Us Online» Products MySQL Enterprise Edition MySQL Standard Edition MySQL Classic Edition MySQL Cluster CGE MySQL Embedded (OEM/ISV) Services Training Certification Consulting Support Downloads MySQL Community Server MySQL Cluster MySQL Fabric MySQL Utilities MySQL Workbench About MySQL Contact Us How to Buy Partners Job Opportunities Site Map Documentation MySQL Reference Manuals MySQL Workbench Expert Guides Topic Guides MySQL Cluster Legal Legal Policies Your Privacy Rights Terms of Use Trademark Policy Contributor Agreement © 2015, Oracle Corporation and/o