• 欢迎访问显哥博客,本网站纯属学习技术,绝无商业用途,欢迎小伙伴们共同学习!研究技术!QQ:52249909 加我QQ
  • 世界75亿人,这么小的概率,能认识你,是我一生的幸运,不妨加个QQ接触一下:52249909 加我QQ

数据库导出Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions【显哥出品,必为精品】

MySQL lixian 3年前 (2022-03-03) 11027次浏览 1个评论 扫描二维码

数据库导出报错

Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, 
even those that changed suppressed parts of the database. If you don't want to restore GTIDs, 
pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events.

说明

mysqldump  Ver 10.13 Distrib 5.6.34, for Linux (x86_64)
关于GTID是5.6以后,加入了全局事务 ID (GTID) 来强化数据库的主备一致性,故障恢复,以及容错能力。
官方给的:A global transaction identifier (GTID) is a unique identifier created and associated with each transaction committed on the server of origin (master).
所以可能是因为在一个数据库里面唯一,但是当导入其他的库就有可能重复。所有会有一个提醒。

可以通过添加--set-gtid-purged=off 或者–gtid-mode=OFF这两个参数设置。
个人认为是在导入库中重新生产GTID,而不用原来的。

喜欢 (1)

您必须 登录 才能发表评论!

(1)个小伙伴在吐槽
  1. Cool. I spent a long time looking for relevant content and found that your article gave me new ideas, which is very helpful for my research. I think my thesis can be completed more smoothly. Thank you.
    Sign Up2023-03-12 15:18