MySQL error code 1217 (ER_ROW_IS_REFERENCED): Cannot delete or update a parent row: a foreign key co
来源:互联网 发布:动力节点java全套视频 编辑:程序博客网 时间:2024/04/30 00:27
环境介绍:
CentOS 6.7
数据库版本:MariaDB10.0.21
在删除一张有主键的表时,直接抛出错误“ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails”
解决办法:临时停止主键检查
MariaDB [d]> SET FOREIGN_KEY_CHECKS = 0;
MariaDB [d]> drop table actions;
MariaDB [d]> SET FOREIGN_KEY_CHECKS = 1;
1 0
- MySQL error code 1217 (ER_ROW_IS_REFERENCED): Cannot delete or update a parent row: a foreign key co
- MySQL:ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails...问题解决
- [MySQL]MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL "Cannot delete or update a parent row: a foreign key constraint fails "
- MySQL错误号1451-Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 1217 (23000) at line 19: Cannot delete or update a parent row: a foreign key constraint fails
- 关闭外键检查 ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- SQL Server 生成带流水号的字符串
- 【Cocos2d-x 3.2】裁剪节点(ClippingNode)总结
- Spring-定时器-SimpleTriggerBean时间格式
- 23种设计模式(10):命令模式
- Matlab 2015a 中 pointCloud类相关知识!
- MySQL error code 1217 (ER_ROW_IS_REFERENCED): Cannot delete or update a parent row: a foreign key co
- PHP 函数传递基本数据类型和数组的内存传递方式
- WebSocket服务器 CshBBrain
- 23种设计模式(11):责任连模式
- NSArray、NSMutableArray基本用法
- 23种设计模式(12):策略模式
- sitemapx使用简单教程
- 【Unity3d】在Unity3d中,使用C#中访问系统剪贴板
- 23种设计模式(13):迭代器模式