# restore database error

**URL:** <https://forums.percona.com/t/restore-database-error/1510>\
**Category:** Other MySQL® Questions\
**Created:** [September 20, 2010, 3:50pm UTC](https://forums.percona.com/t/restore-database-error/1510 "2010-09-20T15:50:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gjuan](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@gjuan](https://forums.percona.com/u/gjuan)\
**Post date:** [September 20, 2010, 3:50pm UTC](https://forums.percona.com/t/restore-database-error/1510/1 "2010-09-20T15:50:11Z")

</div>

Hi,

I have a schema with innodb and myisam tables. I have generated a dump like this:

mysqldump -uuser -ppass -R -q --compact dbname \> file.sql

When i try to restore it in a new schema  
mysql -user -ppass dbname \< file.sql

the next error appears:

ERROR 1005 (HY000) at line 72: Can’t create table ‘./dbname/table.frm’ (errno: 150)

The table has references to another table that is not created yet.  
If i delete the references statements for that table, it is created.

How can i restore it without delete table references?

Thanks for your help
