DM上游数据库权限检查报错

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:3.0.12
  • 【问题描述】:DM是1.0.5的,按照权限给够了,但是在校验的时候报错。但是权限应该是够的, REPLICATION SLAVE, REPLICATION CLIENT,RELOAD ,SELECT这四个都确认存在。不过这个mysql库是从库
	{
				"id": 12,
				"name": "source db replication privilege chcker",
				"desc": "check replication privileges of source DB",
				"state": "fail",
				"errorMsg": "line 1 column 315 near \"TABLESPACE ON *.* TO 'uic'@'10.204.%.%' IDENTIFIED BY PASSWORD '*0AE1DCD78F0F8821872DC52D079C7C83F83CDF69'\" \
github.com/pingcap/errors.AddStack\
\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/errors.go:174\
github.com/pingcap/errors.Trace\
\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/juju_adaptor.go:15\
github.com/pingcap/parser.(*Parser).Parse\
\t/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200422082501-7329d80eaf2c/yy_parser.go:123\
github.com/pingcap/parser.(*Parser).ParseOneStmt\
\t/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200422082501-7329d80eaf2c/yy_parser.go:138\
github.com/pingcap/tidb-tools/pkg/check.verifyPrivileges\
\t/go/pkg/mod/github.com/pingcap/tidb-tools@v4.0.0-rc.1.0.20200423101451-efaa8b1028bc+incompatible/pkg/check/privilege.go:125\
github.com/pingcap/tidb-tools/pkg/check.(*SourceReplicatePrivilegeChecker).Check\
\t/go/pkg/mod/github.com/pingcap/tidb-tools@v4.0.0-rc.1.0.20200423101451-efaa8b1028bc+incompatible/pkg/check/privilege.go:96\
github.com/pingcap/tidb-tools/pkg/check.Do.func2\
\t/go/pkg/mod/github.com/pingcap/tidb-tools@v4.0.0-rc.1.0.20200423101451-efaa8b1028bc+incompatible/pkg/check/check.go:118\
runtime.goexit\
\t/usr/local/go/src/runtime/asm_amd64.s:1357\
grants[0] GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'uic'@'10.204.%.%' IDENTIFIED BY PASSWORD '*0AE1DCD78F0F8821872DC52D079C7C83F83CDF69'",
				"instruction": "",
				"extra": "address of db instance - 10.204.12.33:3326"
			},
			{
				"id": 7,
				"name": "mysql_version",
				"desc": "check whether mysql version is satisfied",
				"state": "success",
				"errorMsg": "",
				"instruction": "",
				"extra": "address of db instance - 10.204.12.33:3326"
			},
			{
				"id": 11,
				"name": "source db dump privilege chcker",
				"desc": "check dump privileges of source DB",
				"state": "fail",
				"errorMsg": "line 1 column 315 near \"TABLESPACE ON *.* TO 'uic'@'10.204.%.%' IDENTIFIED BY PASSWORD '*0AE1DCD78F0F8821872DC52D079C7C83F83CDF69'\" \
github.com/pingcap/errors.AddStack\
\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/errors.go:174\
github.com/pingcap/errors.Trace\
\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/juju_adaptor.go:15\
github.com/pingcap/parser.(*Parser).Parse\
\t/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200422082501-7329d80eaf2c/yy_parser.go:123\
github.com/pingcap/parser.(*Parser).ParseOneStmt\
\t/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20200422082501-7329d80eaf2c/yy_parser.go:138\
github.com/pingcap/tidb-tools/pkg/check.verifyPrivileges\
\t/go/pkg/mod/github.com/pingcap/tidb-tools@v4.0.0-rc.1.0.20200423101451-efaa8b1028bc+incompatible/pkg/check/privilege.go:125\
github.com/pingcap/tidb-tools/pkg/check.(*SourceDumpPrivilegeChecker).Check\
\t/go/pkg/mod/github.com/pingcap/tidb-tools@v4.0.0-rc.1.0.20200423101451-efaa8b1028bc+incompatible/pkg/check/privilege.go:58\
github.com/pingcap/tidb-tools/pkg/check.Do.func2\
\t/go/pkg/mod/github.com/pingcap/tidb-tools@v4.0.0-rc.1.0.20200423101451-efaa8b1028bc+incompatible/pkg/check/check.go:118\
runtime.goexit\
\t/usr/local/go/src/runtime/asm_amd64.s:1357\
grants[0] GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'uic'@'10.204.%.%' IDENTIFIED BY PASSWORD '*0AE1DCD78F0F8821872DC52D079C7C83F83CDF69'",
				"instruction": "",
				"extra": "address of db instance - 10.204.12.33:3326"
			},

你好,确认下 tablespace 命令的完整语句是什么。在 task 文件中使用 Binlog event filter 将这个命令过滤掉,从报错信息来看,此命令在 tidb 中并不被支持。

好的,谢谢。我昨天也用

ignore-checking-items: ["dump_privilege", "replication_privilege"]

跳过权限检查,也不知道这个table-space是哪里来的

ok,需要关注下同步中是否还存在类似的不兼容 ddl,否则需要使用上述办法处理下

好的,谢谢

:call_me_hand: