MySQL foreign key creation failure 1005 reason summary
MySQL foreign key creation failure 1005 reason summary _ MySQL
1. install mysql with InnoDB plug-in extension
./Configure -- prefix =/usr/local/mysql -- with-plugins = csv, innobase, myisam, heap, innodb_plugin
2. the column referenced in the master table cannot be found.
3. the character encoding of the primary key and the foreign key is inconsistent.
4. the foreign key field does not match the field type to be verified.
5. MySQL supports foreign key constraints and provides the same functions as other databases, but the table type must be InnoDB. non-InnoDB storage engines may report errors.
6. the column in the table that created the foreign key does not have an index.
The above is the summary of the 1005 cause of MySQL foreign key creation failure _ MySQL content. For more information, please follow the PHP Chinese network (www.php1.cn )!