Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ 问题咨询 ]SQL上线执行语句失败,提示需要SUPER权限 #129

Closed
changeyourt opened this issue Apr 16, 2019 · 10 comments
Closed
Labels
question Further information is requested

Comments

@changeyourt
Copy link

问题描述

对于正常审核通过的update语句,选择了备份,但是执行时却报错。报错如下:
Execute: Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation
对于正常审核通过的create table、insert语句,选择了备份,是可以正常执行并备份的。
用户拥有create,select,insert,delete,update权限。

版本信息

  • 应用版本/分支:是在2月25日通过docker-compose.yml文件构建的,具体版本不是很清楚
  • 部署方式:Docker
@changeyourt changeyourt added the question Further information is requested label Apr 16, 2019
@LeoQuote
Copy link
Collaborator

LeoQuote commented Apr 16, 2019

权限不足, 请按文档设置Mysql账号

https://github.com/hhyo/archery/wiki/%E9%85%8D%E7%BD%AE%E9%A1%B9%E8%AF%B4%E6%98%8E#inception%E9%85%8D%E7%BD%AE
https://inception-document.readthedocs.io/zh_CN/latest/requires/

报错信息写着需要 SUPER, REPLICATION CLIENT 权限, 你就给账号这个权限不就行了。。。

为什么create table, insert 不报错, 因为这两个操作选择备份了依然不会备份, 不会涉及到这些权限。

@LeoQuote
Copy link
Collaborator

@hhyo hhyo changed the title [ 问题咨询 ] [ 问题咨询 ]备份失败,提示需要SUPER权限 Apr 16, 2019
@hhyo
Copy link
Owner

hhyo commented Apr 16, 2019

抱歉少了一个文档链接 https://github.com/hhyo/archery/wiki/faq#%E6%97%A0%E6%B3%95%E7%94%9F%E6%88%90%E5%9B%9E%E6%BB%9A%E8%AF%AD%E5%8F%A5

应该第五项检查没通过,大家的时间和精力都有限,有问题还是先确认文档

  1. 检查binlog是否开启,并且格式需要为ROW,binlog_row_image为FULL

这个问题的根本原因是,如果binlog格式不为ROW,inception会尝试 set binlog_format=row,
而这个操作需要super权限,所以会有这个错误提示

我也是通过抓包获取inception的执行语句获取到该信息

@changeyourt
Copy link
Author

不好意思,耽误你们的时间了。
其实我的问题不是无法备份。在备份库中是能正常生成回滚语句的,但就是update语句无法成功。

@hhyo
Copy link
Owner

hhyo commented Apr 16, 2019

看前面的回复,如果inception尝试更改binlog格式为row,是会在执行前更改还是执行后更改?

其实这点想清楚就好了

@changeyourt
Copy link
Author

明白了!

@hhyo hhyo changed the title [ 问题咨询 ]备份失败,提示需要SUPER权限 [ 问题咨询 ]SQL上线执行语句失败,提示需要SUPER权限 Apr 16, 2019
@qq290070744
Copy link

qq290070744 commented Nov 28, 2019

binlog格式为MIXED可以吗,腾讯云MySQL的binlog格式默认为MIXED,而且腾讯云的MySQL数据库root用户不能修改binlog格式

@hhyo
Copy link
Owner

hhyo commented Nov 28, 2019

binlog格式为MIXED可以吗,腾讯云MySQL的binlog格式默认为MIXED,而且腾讯云的MySQL数据库root用户不能修改binlog格式

目前不支持非row模式的回滚,只能关闭备份执行

@Chren
Copy link

Chren commented Mar 23, 2020

binlog格式为MIXED可以吗,腾讯云MySQL的binlog格式默认为MIXED,而且腾讯云的MySQL数据库root用户不能修改binlog格式

目前不支持非row模式的回滚,只能关闭备份执行

我看说明是默认强制要求备份,要怎么改成默认关闭备份呢?:

ENABLE_BACKUP_SWITCH
是否开启备份选项(默认关闭, 强制要求备份)

@anyuqingcloud
Copy link

我的生产库的实例binlog日志格式都为statement,但是archery执行sql语句时会设置set session binlog-formart=ROW,这个设置可以取消吗,这导致主从同步断开

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants