MySQL "Error 1005" when adding tables

I recently worked with a MySQL database and used the MySQL workbench to develop the database.

When I use the export function to SQL, so I can actually get the layout in the database, I get:

"Error 1005: Unable to create table"

This seems to be related to foreign keys in the create table statement.

Does anyone have a job for this that does not involve lifting the restrictions and then returning them? This is less than ideal considering the size of the database.

+3
source share
2 answers

When you get this (and other errors from the InnoDB engine):

SHOW ENGINE INNODB STATUS;

, . , , .

+7

, ( InnoDB) .

MySQL 5.1

+1

Source: https://habr.com/ru/post/1696591/


All Articles