mysql 在删除数据出现Cannot delete or update a parent row: a foreign key constraint fails  这个该如何解决

可以这样解决:

SET FOREIGN_KEY_CHECKS = 0; 执行这条语句,

然后再删便可。

mysql 在删除数据出现Cannot delete or update a parent row: a foreign key constraint fails 这个该如何解决的更多相关文章

  1. MySQL:ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails

    MySQL在删除一张表时出现 ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fa ...

  2. Hibernate级联删除时:Cannot delete or update a parent row: a foreign key constraint fails异常

    在删除主表数据时,报了一个异常 Cannot delete or update a parent row: a foreign key constraint fails 原因是主表中还包含字表的数据, ...

  3. 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 问题的解决办法查询:DELETE ...

  4. Mysql - 删除表时出现: Cannot delete or update a parent row: a foreign key constraint fails

    现象 MySQL在删除一张表时出现 ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint ...

  5. MySQL主从复制中断,报“Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217” 错误

    前几天,发现从库挂了,具体报错信息如下: 分析思路 1. 因为我采用的是选择性复制,只针对以下几个库进行复制: card,upay,deal,monitor,collect.所以,不太可能出现对于sa ...

  6. 【转】表删除时 Cannot delete or update a parent row: a foreign key constraint fails 异常处理

    转载地址:http://lijiejava.iteye.com/blog/790478 有两张表,结构如下: t_item:                          t_bid: id    ...

  7. Mysql之1451 - Cannot delete or update a parent row: a foreign key constraint fails...解决办法记录

    今天使用delete语句删除一张表中的一条信息时,提示了这么一个错误:1451 - Cannot delete or update a parent row: a foreign key constr ...

  8. 表删除时 Cannot delete or update a parent row: a foreign key constraint fails 异常处理

    有两张表,结构如下: t_item:                          t_bid: id        int                     id        int n ...

  9. ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails ()

    centos7.5 删除表空间文件失败 问题: mysql> alter table country discard tablespace; ERROR 1451 (23000): Cannot ...

随机推荐

  1. flutter第一课

    网上搜到有一个8小时体验flutter的教程,感觉可以尝试一个hello world出来:https://www.jianshu.com/p/9aaabc60d8af 官网下载很慢,可以使用镜像下载, ...

  2. Treevalue(0x03)——函数树化详细解析(下篇)

    好久不见,再一次回到 treevalue 系列.本文将基于上一篇treevalue讲解,继续对函数的树化机制进行详细解析,并且会更多的讲述其衍生特性及应用. 树化方法与类方法 首先,基于之前的树化函数 ...

  3. 【R shiny】一些应用记录

    目录 DT和downloadButton应用 downloadButton 中验证结果输出 添加进度条 如何确保仅在使用Shiny按下操作按钮时才触发操作 其他 DT和downloadButton应用 ...

  4. c语言转义字符如下

    #define MQTT_EVENT_REPORT_BOX_STATUS_FORMAT "{"\                                           ...

  5. 关于蓝牙Mesh您必须知道的七件事

    蓝牙技术联盟于7月19日正式宣布,蓝牙(Bluetooth)技术开始全面支持Mesh网状网络.全新的Mesh功能提供设备间多对多传输,并特别提高构建大范围网络覆盖的通信能力,适用于楼宇自动化.无线传感 ...

  6. KEPServeEX 6与KepOPC中间件测试

    KEPServeEX 6可以组态服务器端和客户端连接很多PLC以及具有OPC服务器的设备,以下使用KEPServeEX 6建立一个OPC UA服务器,然后使用KepOPC建立客户端来连接服务器做测试. ...

  7. C#数字验证

    using System; using System.Collections; using System.Configuration; using System.Data; using System. ...

  8. 巩固javaweb第十天

    巩固内容: HTML <meta> 元素 meta标签描述了一些基本的元数据. <meta> 标签提供了元数据.元数据也不显示在页面上,但会被浏览器解析. META 元素通常用 ...

  9. add more

    # -*- coding: utf-8 -*- print('123', 123) print(type('123'), type(123)) # string, integer /ˈintidʒə/ ...

  10. Spark集群环境搭建——服务器环境初始化

    Spark也是属于Hadoop生态圈的一部分,需要用到Hadoop框架里的HDFS存储和YARN调度,可以用Spark来替换MR做分布式计算引擎. 接下来,讲解一下spark集群环境的搭建部署. 一. ...