ERROR 1005: Can't create table './db/table.frm' (errno: 150)

Skip to first unread message

Heikki Tuuri

Jun 16, 2003, 1:41:54 PM6/16/03

please print with


what kind of foreign key error InnoDB complains about in the import.

Can you produce a repeatable test case with table dumps that shows the

Are you sure you are importing all the tables within the same connection
where you have set foreign_key_checks=0?

Best regards,

Innobase Oy
InnoDB - transactions, foreign keys, and a hot backup tool for MySQL
Order MySQL support from


Subject: ERROR 1005: Can't create table './db/table.frm' (errno: 150)
From: Ben Clewett
Date: Mon, 16 Jun 2003 10:53:28 +0000

Dear MySQL:

I am getting the error 'ERROR 1005: Can't create table './db/table.frm'
(errno: 150)' using InnoDB tables on 4.0.13-max-log.

This is nothing to do with referential checking. The command:
SET foreign_key_checks=0
Does alow the import of referential tables, but not all tables. Some
still give a '150'.

Generally the only consistent way I have found to avoid this is to drop
all my tables and start again. But this is not practicle as I keep
loosing all my data!

This is a problem I have come accross with InnoDB since first using
these. I know I am not alone with this problem from the number of hits
from a popular search engine from this error code. None of which
suggest working fix's.

1. Can somebody please tell me a consistent way of avoiding and dealing
with this problem.

2. Can somebody please tell me when this will be fixed for good.

3. Can somebody please adjust the error messages so that the newbe has a
fighting change of understanding what the hell is going on.

Many thanks,

Ben Clewett.

MySQL General Mailing List
For list archives:
To unsubscribe:

Reply all
Reply to author
0 new messages