quot;Duplicate check constraint namequot; without duplicate(“重复检查约束名称无重复)
问题描述
我正在尝试将一个大型 MySQL 架构导入一个空数据库.
I'm trying to import a big MySQL schema into an empty database.
我有这个错误:
ERROR 3822 (HY000) at line 2682: Duplicate check constraint name 'notifications_chk_1'.
但不存在约束notifications_chk_1.
检查空数据库:它是 100% 空的.
Checked the empty database : it's 100% empty.
查看mysql文件:notifications_chk_1只出现一次:
Checked the mysql file : notifications_chk_1 appears only once:
$ grep "notifications_chk_1" qs_remote_multi.sql
CONSTRAINT `notifications_chk_1` CHECK (json_valid(`related`))
- 发生错误后检查数据库,不存在
notifications_chk_1:
MySQL [(none)]> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE = 'CHECK' AND CONSTRAINT_NAME LIKE "notif%";
Empty set (0.006 sec)
Mysqldump 版本(来源):MySQL dump 10.19 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64)
Mysqldump version (source): MySQL dump 10.19 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64)
Mysql 版本(目标):mysql Ver 15.1 Distrib 10.3.32-MariaDB,用于 osx10.15 (x86_64) 使用 readline 5.1
Mysql version (target): mysql Ver 15.1 Distrib 10.3.32-MariaDB, for osx10.15 (x86_64) using readline 5.1
有什么想法吗?
推荐答案
通过执行 MariaDB 全新安装(擦除所有数据)来修复它.
Fixed it by doing a MariaDB fresh install (erasing all data).
这篇关于“重复检查约束名称"无重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“重复检查约束名称"无重复
基础教程推荐
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
