上游同步数据库账号信息发生变化如何进行同步

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

  • 【TiDB 版本】:v3.0.9
  • 【问题描述】: 问一下,如果上游的数据账号信息变了,比如账号原来用的bd_write现在换成 db_dm了,我按如下操作步骤,报了如下的错,是哪操作有问题?

1、stop-task dm_worker1

2、修改inventory.ini中的用户信息

3、ansible-playbook deploy.yml --tags=dm-worker -l dm_worker1

4、ansible-playbook start.yml --tags=dm-worker -l dm_worker1

5、ansible-playbook rolling_update.yml --tags=dm-master

6、ansible-playbook rolling_update_monitor.yml --tags=prometheus

7、start-task dm_worker1

{

“result”: true,

“msg”: “”,

“workers”: [

{

“result”: true,

“worker”: “172.17.116.163:8264”,

“msg”: “”,

“subTaskStatus”: [

{

“name”: “bd_product”,

“stage”: “Paused”,

“unit”: “InvalidUnit”,

“result”: {

“isCanceled”: false,

“errors”: [

{

“Type”: “UnknownError”,

“msg”: “[code=36035:class=sync-unit:scope=internal:level=medium] fail to initial unit Sync of subtask bd_product : heartbeat config is different from previous used: serverID not equal, self: 0, other: 111[ngithub.com/pingcap/dm/pkg/terror.(*Error).Generatef](http://ngithub.com/pingcap/dm/pkg/terror.(*Error).Generatef)\n\t/go/src/github.com/pingcap/dm/pkg/terror/terror.go:237[ngithub.com/pingcap/dm/syncer.(*HeartbeatConfig).Equal](http://ngithub.com/pingcap/dm/syncer.(*HeartbeatConfig).Equal)\n\t/go/src/github.com/pingcap/dm/syncer/heartbeat.go:67[ngithub.com/pingcap/dm/syncer.GetHeartbeat](http://ngithub.com/pingcap/dm/syncer.GetHeartbeat)\n\t/go/src/github.com/pingcap/dm/syncer/heartbeat.go:105[ngithub.com/pingcap/dm/syncer.(*Syncer).Init](http://ngithub.com/pingcap/dm/syncer.(*Syncer).Init)\n\t/go/src/github.com/pingcap/dm/syncer/syncer.go:392[ngithub.com/pingcap/dm/dm/worker.(*SubTask).Init](http://ngithub.com/pingcap/dm/dm/worker.(*SubTask).Init)\n\t/go/src/github.com/pingcap/dm/dm/worker/subtask.go:129[ngithub.com/pingcap/dm/dm/worker.(*SubTask).Run](http://ngithub.com/pingcap/dm/dm/worker.(*SubTask).Run)\n\t/go/src/github.com/pingcap/dm/dm/worker/subtask.go:172[ngithub.com/pingcap/dm/dm/worker.(*Worker).handleTask](http://ngithub.com/pingcap/dm/dm/worker.(*Worker).handleTask)\n\t/go/src/github.com/pingcap/dm/dm/worker/worker.go:832[ngithub.com/pingcap/dm/dm/worker.(*Worker).Start.func1](http://ngithub.com/pingcap/dm/dm/worker.(*Worker).Start.func1)\n\t/go/src/github.com/pingcap/dm/dm/worker/worker.go:178\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357”,

“error”: null

}

],

“detail”: null

},

“unresolvedDDLLockID”: “”

}

],

“relayStatus”: {

“masterBinlog”: “(mysql-bin.001139, 76359582)”,

“masterBinlogGtid”: “8e1f3f0d-1699-11ea-88f0-506b4bff29a4:1-425137087”,

“relaySubDir”: “8e1f3f0d-1699-11ea-88f0-506b4bff29a4.000001”,

“relayBinlog”: “(mysql-bin.001139, 76359582)”,

“relayBinlogGtid”: “8e1f3f0d-1699-11ea-88f0-506b4bff29a4:1-425137087”,

“relayCatchUpMaster”: true,

“stage”: “Running”,

“result”: null

},

“sourceID”: “bd_product”

}

]

}

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

滚动一下 dm_worker1 ansible-playbook rolling_update.yml -t dm-worker -l dm_worker1

账号密码是 dm-worker 对应使用的,所以需要滚动更新 dm-worker 的配置

1赞

更新一下操作步骤 1、stop-task dm_worker1 2、修改inventory.ini中的用户信息为新的 3、ansible-playbook rolling_update.yml -t dm-worker -l dm_worker1 4、start-task

:+1::+1::+1:

1赞