Mysql Error 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 this site About Us Learn more about Stack Overflow the mysql error code 1005. can't create table (errno 150) company Business Learn more about hiring developers or posting ads with us Stack Overflow
Sql Server Error 121
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2
Errno 121 Mysql
million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Mysql can't create table errno 121 up vote 8 down vote favorite Why am I getting this error? I
Windows Error 121
don't have any foreign keys drop table if exists t_issue; SET foreign_key_checks = 0;SET storage_engine=INNODB; CREATE TABLE `t_issue` ( `id_issue` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `fk_project` int(11) DEFAULT NULL, `subject` varchar(255) DEFAULT NULL, `estimated_due_date` date DEFAULT NULL, `due_date` date DEFAULT NULL, `done_ratio` int(11) DEFAULT NULL, `fk_status` int(11) DEFAULT NULL, `fk_assigned_to` int(11) DEFAULT NULL, `fk_owner` int(11) DEFAULT NULL ) ENGINE=innodb DEFAULT CHARSET=latin1 mysql share|improve this question asked Mar 28 '14 at 12:14 patentul mysql error no 150 5342417 2 Seems to work OK for me. –Malcolm Mar 28 '14 at 12:17 It's working.What error you are facing –Nagaraj S Mar 28 '14 at 12:17 It's work fine for me –Sadikhasan Mar 28 '14 at 12:19 I changed the name of the table to t_issue1 and the query works for that, for t_issue it doesen't. However I did a "Show tables" but no table named t_issue exists. What could the problem be? –patentul Mar 28 '14 at 12:20 1 It is the same previous question from you: Mysql can't create table errno 121 –Ravinder Reddy Mar 28 '14 at 12:28 | show 4 more comments 1 Answer 1 active oldest votes up vote 22 down vote accepted Mysql can't create table errno 121 You will get this message if you are trying to add a constraint with a name that is already used somewhere else. To check constraints, use the following SQL query: SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' AND table_schema = DATABASE() ORDER BY constraint_name; Reference: http://dba.stackexchange.com/questions/425/error-creating-foreign-key-from-mysql-workbench See also: SQL - error code 1005 with error number 121 share|improve this answer edited Jul 20 at 7:57 Camil Staps 4,26173790 answered Mar 28 '14 at 12:47 jmail 3,0172723 I did this
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 errno 121 linux site About Us Learn more about Stack Overflow the company Business Learn mysql rename constraint more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question mysql error 1005 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 ERROR: http://stackoverflow.com/questions/22712553/mysql-cant-create-table-errno-121 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 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'; -- ----------------------------------------------------- -- http://stackoverflow.com/questions/12623651/error-error-1005-cant-create-table-errno-121 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; -- ----------------------------------------------------- -- Table `Schedule` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Schedule` ; CREATE TABLE IF NOT EXISTS `Schedule` ( `lesson_id` VARCHAR(10) NOT NULL , `day` VARCHAR(3) NOT NULL , `branch` VARCHAR(30) NOT NULL , `level` VARCHAR(30) NOT NULL , `time` TIME NOT NULL , `ae` VARCHAR(45) NOT NULL , PRIMARY KEY (`lesson_id`) ) ENGINE = InnoD
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 http://stackoverflow.com/questions/3316410/sql-error-errno-121 this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question https://bugs.mysql.com/bug.php?id=26507 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 mysql error sql error errno: 121 up vote 71 down vote favorite 5 CREATE TABLE `users` ( `UID` INT UNSIGNED NOT NULL AUTO_INCREMENT , `username` VARCHAR(45) NOT NULL , `password` VARCHAR(100) NULL , `name` VARCHAR(100) NULL , `gender` BIT NULL , `email` VARCHAR(255) NULL , `phone` VARCHAR(30) NOT NULL , `verified` BIT NOT NULL DEFAULT 0 , `time_zone` INT NULL , `time_register` DATETIME NULL , mysql error 121 `time_active` DATETIME NULL , PRIMARY KEY (`UID`) , UNIQUE INDEX `username_UNIQUE` (`username` ASC) , INDEX `verified_INDEX` (`verified` ASC) ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; -- ----------------------------------------------------- -- Table `companies` -- ----------------------------------------------------- CREATE TABLE `companies` ( `CID` INT UNSIGNED NOT NULL AUTO_INCREMENT , `name` VARCHAR(45) NOT NULL , `address` VARCHAR(100) NULL , `email` VARCHAR(255) NULL , `phone` VARCHAR(30) NULL , `link` TEXT NULL , `image_small` TEXT NULL , `image_large` TEXT NULL , `yahoo` VARCHAR(100) NULL , `linkin` VARCHAR(100) NULL , `twitter` VARCHAR(20) NULL , `description` TEXT NULL , `shoutout` VARCHAR(140) NULL , `verified` BIT NOT NULL DEFAULT 0 , PRIMARY KEY (`CID`) , INDEX `name_INDEX` (`name` ASC) , INDEX `verified_INDEX` (`verified` ASC) ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; -- ----------------------------------------------------- -- Table `products` -- ----------------------------------------------------- CREATE TABLE `products` ( `PID` INT UNSIGNED NOT NULL AUTO_INCREMENT , `CID` INT UNSIGNED NOT NULL , `name` VARCHAR(100) NULL , `description` TEXT NULL , `image_small` TEXT NULL , `image_large` TEXT NULL , `tag` VARCHAR(45) NULL , `price` DECIMAL(11,2) NULL , PRIMARY KEY (`PID`) , INDEX `tag_INDEX` (`tag` ASC) , INDEX `company.cid_FK` (`CID` ASC) , CONSTRAINT `company.cid_FK` FORE
Galbraith Email Updates: Status: Not a Bug Impact on me: None Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious) Version:5.0.27-max-log, 5.1.36, 5.0, 5.1 bzr OS:Linux (Linux, Fedora Core 6) Assigned to: Jimmy Yang Triage: Triaged: D4 (Minor) View Add Comment Files Developer Edit Submission View Progress Log Contributions [20 Feb 2007 17:59] Patrick Galbraith Description: I cannot create a legitimate InnoDB table in a database that is being replicated because of this error: mysql> CREATE TABLE `profiles` ( -> `profile_id` bigint(20) NOT NULL auto_increment, -> `uid` bigint(20) NOT NULL, -> `name` varchar(32) NOT NULL default '', -> `title` varchar(64) NOT NULL default '', -> `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -> `access` int(4) default NULL, -> PRIMARY KEY (`profile_id`), -> KEY `uid` (`uid`) -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ERROR 1005 (HY000): Can't create table './grazr_accounts/profiles.frm' (errno: 121) The error is this: [root@db1 var]# perror 121 OS error code 121: Remote I/O error If I create this same table with MyISAM, it works: mysql> CREATE TABLE `profiles` ( `profile_id` bigint(20) NOT NULL auto_increment, `uid` bigint(20) NOT NULL, `name` varchar(32) NOT NULL default '', `title` varchar(64) NOT NULL default '', `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `access` int(4) default NULL, PRIMARY KEY (`profile_id`), KEY `uid` (`uid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Query OK, 0 rows affected (0.00 sec) Also, if I do this via a non-replicated db: mysql> CREATE TABLE `profiles` ( `profile_id` bigint(20) NOT NULL auto_increment, `uid` bigint(20) NOT NULL, `name` varchar(32) NOT NULL default '', `title` varchar(64) NOT NULL default '', `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `access` int(4) default NULL, PRIMARY KEY (`profile_id`), KEY `uid` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ERROR 1005 (HY000): Can't create table './grazr_accounts/profiles.frm' (errno: 121) mysql> connect foo; Connection id: 8 Current database: foo mysql> CREATE TABLE `profiles` ( `profile_id` bigint(20) NOT NULL auto_increment, `uid` bigint(20) NOT NULL, `name` varchar(32) NOT NULL default '', `title` varchar(64) NOT NULL default '', `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `access` int(4) default NULL, PRIMARY KEY (`profile_id`), KEY `uid` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Query OK, 0 rows affected (0.01 sec) Here are my specifics: mysql> select version(); +----------------+ | version() | +----------------+ |