MySQL foreign key creation failure 1005 reason summary _ MySQL

Source: Internet
Author: User
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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.