Quick tip: Mysql ERROR 1005


ERROR 1005 (HY000) at line 296: Can't create table './debradb/comment.frm' (errno: 150)


check what is going on by passing this sql command to mysql command line:

SHOW ENGINE INNODB STATUS;

and next look for error ;). In most case errors are made by


  • incorrect data types and flags for primary key and foreign keys

  • lack of primary key, in innodb your relation have to contain primary key

  • all relation have to be the same type. In default installation of mysql set as default engine myisam


No comments: