#1005: Cannot create table.frm (error 121)

Discussion in 'MySQL' started by Triexa, Feb 26, 2010.

  1. #1
    I generally use phpMyAdmin but am using MySQL workbench to set up everything ahead of time and organize it.

    I right click my table, and "Copy SQL to clipboard". This is what I got:
    CREATE  TABLE IF NOT EXISTS `mydb`.`tblArticleClicks` (
      `click_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
      `article_id` INT UNSIGNED NULL DEFAULT 0 ,
      `click_ip` VARCHAR(15) NULL ,
      `click_ip_long` INT UNSIGNED NULL DEFAULT 0 ,
      `click_time` INT UNSIGNED NULL DEFAULT 0 ,
      PRIMARY KEY (`click_id`) ,
      INDEX `FK_ARTICLE_ID` (`article_id` ASC) ,
      CONSTRAINT `FK_ARTICLE_ID`
        FOREIGN KEY (`article_id` )
        REFERENCES `mydb`.`tblArticles` (`article_id` )
        ON DELETE CASCADE
        ON UPDATE CASCADE)
    ENGINE = InnoDB
    Code (markup):
    This is what I get in return:
    #1005 - Can't create table './mydb/tblArticleClicks.frm' (errno: 121)
    Code (markup):
    Have I set it up wrong/is it invalid SQL/something I need to do first? Any insight greatly appreciated!
     
    Triexa, Feb 26, 2010 IP