MySQL Forums
Forum List  »  Newbie

Cannot create table (Error Code: 1005, errno: 121). OK after i rename table
Posted by: Jiew Meng Lim
Date: August 17, 2010 09:58PM

i have sql like

CREATE TABLE `posts` (
    `id` INT AUTO_INCREMENT NOT NULL,
    `user_id` INT DEFAULT NULL, 
    `title` VARCHAR(60) NOT NULL, 
    `body` LONGTEXT NOT NULL, 
    `thumbnail` VARCHAR(255) DEFAULT NULL, 
    `dtPosted` DATETIME NOT NULL, 
    `dtLastAction` DATETIME DEFAULT NULL, 
    `lft` INT NOT NULL, 
    `rgt` INT NOT NULL, 
    `root` INT DEFAULT NULL, 
    PRIMARY KEY (`id`)
) ENGINE = InnoDB;

i get the error

Error Code: 1005
Can't create table 'learningzf.posts' (errno: 121)

but when i try to change the name of the table to post2 it works. why is this so?



Edited 1 time(s). Last edit at 08/17/2010 10:16PM by Jiew Meng Lim.

Options: ReplyQuote


Subject
Written By
Posted
Cannot create table (Error Code: 1005, errno: 121). OK after i rename table
August 17, 2010 09:58PM


Sorry, you can't reply to this topic. It has been closed.

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.