| Subcribe via RSS

MySQL ErrorNo 121

December 29th, 2009 | No Comments | Posted in MySQL, Web Development

MySQL has a helpful error “Can’t create table (errno: 121)” which doesn’t seem to be documented anywhere except in forums.

Turns out this error is caused by InnoDB tables throwing an error when it detects duplicate foreign key names.

Basically, every foreign key has to have a unique name for InnoDB to function correctly.