mysqldump: Couldn’t execute ‘SELECT @@GTID_MODE..._MySQL
程序员文章站
2024-01-19 19:50:28
...
mysqldump
bitsCN.com
mysqldump: Couldn’t execute ‘SELECT @@GTID_MODE...
在使用MySQL 5.6的mysqldump备份5.6之前版本的MySQL时会遇到异常
1
mysqldump: Couldn't execute 'SELECT @@GTID_MODE': Unknown system variable 'GTID_MODE' (1193)
造成此错误的原因是因为5.6引入了Global Transaction Identifiers (GTIDs) 。GTIDs可以让主从结构复制的跟踪和比较变得简单。mysqldump会试图查询这个系统变量,但这个变量在5.6之前的版本中不存在,所以产生错误。的方法很简单。在mysqldump后加上–set-gtid-purged=OFF命令。
1
mysqldump -h dbHost -u dbuser dbName --set-gtid-purged=OFF
bitsCN.com
推荐阅读
-
mysqldump: Couldn’t execute ‘SELECT @@GTID_MODE..._MySQL
-
mysqldump导出时: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CR
-
mysqldump: Couldn’t execute ‘SELECT @@GTID_MODE..._MySQL
-
mysqldump导出时: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CR
-
mysqldump: Couldn't execute 'show events': Cannot proceed_MySQL
-
mysqldump: Couldn't execute 'show events': Cannot proceed_MySQL