

Showing full MySQL foreign key errors
source link: https://stitcher.io/blog/mysql-show-foreign-key-errors
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Scout APM helps PHP developers pinpoint N+1 queries, memory leaks & more so you can troubleshoot fast & get back to coding faster. Start your free 14-day trial today.
Showing full MySQL foreign key errors
In case of a foreign key error when creating or altering a table, MySQL doesn't show the full message.
You can read the full message by executing the following query and inspecting the Status
column.
show engine innodb status;
------------------------
LATEST FOREIGN KEY ERROR
------------------------
2018-02-13 11:12:26 0x70000b776000 Error in foreign key constraint of table table/#sql-7fa_247a:
foreign key (`my_foreing_key`) references `table` (`id`)
on delete cascade:
Cannot resolve table name close to:
(`id`)
on delete cascade
Follow me: Twitter — RSS — Newsletter — Patreon — GitHub
© 2021 stitcher.io — Cookies & Privacy
Recommend
-
8
Showing full MySQL foreign key errors By continuing your visit to this site, you accept the use of cookies. Read more. Scout APM helps...
-
18
T-SQL Join on the foreign key that has zero advertisements I need to link various tables that each have a common key (a serial number in this...
-
6
Technical Articles
-
11
I do not see a foreign key index I created advertisements I've created a table with a unique index as well as a foreign index. When I add the uniqu...
-
10
Create foreign key after normalization advertisements I've been creating a database, and I've just completed the normalization step. One of th...
-
13
How do I know if a property of an EntityObject is a primary key or a foreign key? advertisements Suppose that I have a class generated by Enti...
-
4
Copy link Contributor estebank c...
-
6
Code is available on GitHub What are foreign keys A foreign key is a property in a table that references items in another table. That’s why they ar...
-
12
Do you wonder if MySQL tells you the truth about writes to...
-
5
@rozhnevSlava RozhnevFull stack dev and DBA Maintainer of https://sqlize.onlin...Receive Stories from @...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK