Mysql Error No 121
Contents |
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
Mysql Error Code 1005. Can't Create Table (errno 150)
this site About Us Learn more about Stack Overflow the company Business Learn errno 121 linux more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question sql server error 121 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Can't Create Table '.frm' (errno 121)
MySQL errorno 121 up vote 32 down vote favorite 5 I'm getting this error in MySQL create. I'm doing: CREATE TABLE `blogReply` ( `Id` INT(24) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key of This Table', `blogId` INT(24) NOT NULL COMMENT 'Blog where this reply was posted', `userId` INT(24) NULL COMMENT 'User the blog was posted by', `name` VARCHAR(100) NULL DEFAULT 'Unknown' COMMENT 'The Name
Mysql Error No 150
of the user that the reply was posted by', `email` VARCHAR(100) NULL DEFAULT 'Unknown' COMMENT 'The Email of the user that the reply was posted by', `http` VARCHAR(300) NULL DEFAULT 'Unknown' COMMENT 'The Webaddress of the user that the reply was posted by', `message` TEXT NOT NULL COMMENT 'text of the blog', `votes` INT(10) DEFAULT 0 COMMENT 'Rating of the Blog', `ratedBy` TEXT COMMENT 'People who have already Voted on this blog', `dateReg` BIGINT NOT NULL COMMENT 'Date the User was Registered', PRIMARY KEY (`Id`), CONSTRAINT `FK_userId` FOREIGN KEY(`userId`) REFERENCES `user` (`Id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `FK_blogId` FOREIGN KEY(`blogId`) REFERENCES `blog` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE = InnoDB; Any Ideas? The Error States: Can't create table './xxxxxxxx/blogReply.frm' (errno: 121) mysql foreign-keys mysql-error-1005 share|improve this question edited Nov 6 '12 at 11:08 Teun Zengerink 2,73941929 asked Jul 24 '09 at 23:30 Angel.King.47 3,824124070 add a comment| 4 Answers 4 active oldest votes up vote 108 down vote accepted Check that all your constraints are really spelled out correctly, also check that there's not any other tables that uses the constraint na
here for a quick overview of the site Help Center Detailed answers to any questions you windows error 121 might have Meta Discuss the workings and policies of this site
Mysql Rename Constraint
About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting mysql error 1005 ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 http://stackoverflow.com/questions/1180660/mysql-errorno-121 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR: Error 1005: Can't create table (errno: 121) up vote 81 down vote favorite 21 Im having troubles with forward engineering my MySQL database into WAMP server.. I was going to post an image of the schema http://stackoverflow.com/questions/12623651/error-error-1005-cant-create-table-errno-121 but as this is my first post i can't.. Below is the executed script.. use aquaticstar; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Table `Students` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Students` ; CREATE TABLE IF NOT EXISTS `Students` ( `id` VARCHAR(10) NOT NULL , `studentName` VARCHAR(45) NOT NULL , `gender` CHAR NOT NULL , `birthDate` DATETIME NOT NULL , `mNo` VARCHAR(10) NOT NULL , `contactName` VARCHAR(45) NOT NULL , `contactEmail` VARCHAR(45) NOT NULL , `contactPhone` INT(10) NOT NULL , `startDate` DATETIME NOT NULL , `remarks` VARCHAR(200) NULL , PRIMARY KEY (`id`) ) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `Waiting List` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Waiting List` ; CREATE TABLE IF NOT EXISTS `Waiting List` ( `wait_id` VARCHAR(5) NOT NULL , `name` VARCHAR(45) NULL , `contactName` VARCHAR(45) NULL , `contactPhone` INT(10) NULL , `contactEmail` VARCHAR(45) NULL , `status` CHAR NULL , `remarks` VARCHAR(200) NULL , PRIMARY KEY (`wait_id`) ) ENGINE = InnoDB; -- ------------------------------------
perror 121 says this? MySQL error code 121: Duplicate key on write or update Really confused how you might get a duplicate key error while creating a table? If the table you're trying to create includes a foreign http://thenoyes.com/littlenoise/?p=81 key constraint, and you've provided your own name for that constraint, remember that it must be unique within the database. Run this query to see if that name is in use somewhere: SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' AND table_schema = DATABASE() ORDER BY constraint_name; (If you're still on 4.1 or earlier, mysqldump --no-data yourDbName | grep CONSTRAINT to get a similar list) Thanks to [raymond] on Freenode. Share this:TweetMoreShare mysql error on TumblrPocket Filed under: MySQL FAQ Leave a comment Comments (14) Trackbacks (3) ( subscribe to comments on this post ) Álvaro G. VicarioApril 27th, 2010 - 11:20 In my case, it was an ALTER TABLE … ADD CONSTRAINT query and the name was in use by an index. JamesAugust 11th, 2010 - 12:48 Thank you very much. Worked like a charm. ArtemAugust 23rd, 2010 - 10:36 Thanks a lot! SenthilSeptember 4th, 2010 - mysql error no 07:25 Great !! It worked. DUSMANTA SAHOONovember 20th, 2012 - 01:35 Thank you so much!!!! It worked ChandrababuDecember 1st, 2012 - 02:51 Thanks for post solution for ErrorNo:121, now my DB successfully executed, once again thanks to u… Furkan ÇakmakDecember 4th, 2012 - 05:30 Thank you very much. I have been tried so many things last two hours and I have fixed errors thanks to your note. JoshDecember 13th, 2012 - 21:34 Amazing. Thank you! From San Diego, Josh Per OlesenJanuary 6th, 2013 - 08:15 Awesomeness your way. Thanks! AshtonApril 1st, 2013 - 18:48 Me and my professor have been searching for 2 weeks on how to fix this problem and finally someone pulled through! -Thanks!! meApril 12th, 2013 - 02:08 You sir just saved my day. Thank you! VishaFebruary 5th, 2015 - 05:19 Worked WaqasApril 20th, 2015 - 00:12 Thank you Sir! cyreneFebruary 2nd, 2016 - 15:51 i think its poor that mySQL does not give a hint or a better error message regarding this. Leave a comment Cancel reply Name (required) Email (required) Website Notify me of follow-up comments by email. Notify me of new posts by email. Error creating foreign key from MySQL Workbench | CL-UAT Error creating foreign key from MySQL Workbench | XL-UAT MySQL -- Can't create table (errno: 121) -- Small Coder Blog Flour P