Home > mySQL troubleshooting > ERROR 1005 (HY000): Can’t create table ‘socialmm.#sql-7993_d’ (errno: 121)

ERROR 1005 (HY000): Can’t create table ‘socialmm.#sql-7993_d’ (errno: 121)

I run a patching script for my MySQL DB, it shows the following errors. I search the scripts and find no create table ddl. Why the errors comes out ?.

ERROR 1005 (HY000): Can’t create table ‘socialmm.#sql-7993_d’ (errno: 121)

Finally,  I find out some hints from ” http://www.linuxidc.com/Linux/2011-09/43489.htm”. try to run the command below. The cause of the problem can be found out.

MYSQL> SHOW ENGINE INNODB STATUS\G

 

————————

LATEST FOREIGN KEY ERROR

————————

120314 15:53:49 Error in foreign key constraint creation for table `socialmm`.<result 2 when explaining filename ‘#sql-7993_d’>.

A foreign key constraint of name `socialmm`.`fk_CASE_REPLIES_CASES`

already exists. (Note that internally InnoDB adds ‘databasename’

 

Advertisements
Categories: mySQL troubleshooting
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: