Home>Article>Database> navicat connection 1215 error

navicat connection 1215 error

angryTom
angryTom Original
2019-08-07 13:54:55 5445browse

navicat connection 1215 error

When navicat creates a foreign key, it sometimes reports an error 1215 Cannot add foreign key constraint, that is, it cannot add a foreign key constraint. Simian, we will analyze the causes and solutions of the error for everyone.

Recommended tutorial:MySQL introductory video tutorial

##There are three main reasons for this problem:

(1) The field data types corresponding to the foreign key are inconsistent

(2) When setting the foreign key, "When deleting" is set to "SET NULL"

(3) The storage engines of the two tables are inconsistent

Attachment: How to check the storage engine of the table

show table status from 数据库名 where name='表名';

Modify the table storage method


alter table table_name engine=innodb

Extended information

Navicat is a set of fast, reliable and affordable database management tools designed to simplify Designed for database management and reducing system management costs.It is designed to meet the needs of database administrators, developers and small and medium-sized enterprises. Navicat is built with an intuitive graphical user interface that allows you to create, organize, access and share information in a secure and easy way.

Navicat is world-famous and widely trusted by major enterprises, government agencies, and educational institutions around the world. It is also an essential daily working partner for practitioners from all walks of life. Since 2001, Navicat has been downloaded over 2,000,000 times worldwide and has a customer base of over 70,000 users. More than 100 Fortune 500 companies are using Navicat.

Navicat provides up to 7 languages for customers to choose from and is recognized as the most popular database front-end user interface tool in the world.

 It can be used to manage and develop local or remote MySQL, SQL Server, SQLite, Oracle and PostgreSQL databases.

Navicat is powerful enough to meet all the needs of professional developers, and is easy to learn for those new to database servers. With an extremely complete graphical user interface (GUI), Navicat lets you create, organize, access and share information in a secure and simple way.

Navicat is available on three platforms - Microsoft Windows, Mac OS X and Linux. It allows users to connect to any local or remote server, and provides some practical database tools such as data model, data transfer, data synchronization, structure synchronization, import, export, backup, restore, report creation tools and plans to assist in managing data.

The above is the detailed content of navicat connection 1215 error. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn