Skip to content

后端节点Mysql8.0 时,dble启动出现 'xa recover' 报错 #3290

Answered by wenyh1
Dinosauria asked this question in Q&A
Discussion options

You must be logged in to vote

根据上面的日志看,dble下发语句xa recover至MySQL ,MySQL响应报错:1401, XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency

报错原因:
后端节点Mysql版为8.0;在Mysql8.0中,执行XA RECOVER的用户需要拥有 XA _ RECOVER _ ADMIN 特权;否则报错 1401 ...
具体见:XA_RECOVER_ADMIN

解决方案:
db.xml中配置的后端MySQL用户 需要赋予 XA_RECOVER_ADMIN 权限,比如:

GRANT XA_RECOVER_ADMIN ON *.* TO 'username'@'%';
FLUSH PRIVILEGES;

重启dble 或者 刷新连接池生效。

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by wenyh1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants