arkdb / inception

一个集审核、执行、备份及生成回滚语句于一身的MySQL自动化运维工具
GNU General Public License v2.0
1.87k stars 1.32k forks source link

INSERT报Access denied #29

Closed wowkingah closed 7 years ago

wowkingah commented 7 years ago

Env MySQL: 5.6.29-log Inception: 2.1.50

===================================== 表结构

CREATE TABLE `t2` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT ,
  `menu_name` varchar(64) NOT NULL DEFAULT '' ,
  `menu_url` varchar(128) DEFAULT '' ,
  `pid` int(10) DEFAULT '0' ,
  `mark` varchar(255) NOT NULL DEFAULT '' ,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ,
  `create_by` varchar(64) NOT NULL DEFAULT '' ,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_by` varchar(64) NOT NULL DEFAULT '' ,
  `is_deleted` char(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

检测执行SQL INSERT INTO t2 (id,menu_name,menu_url,pId,mark,is_deleted) VALUES (1, '流量监测平台', '', 0, '导航菜单(一级菜单)','0');

检测信息 4 | CHECKED | 0 | Audit completed | None | INSERT INTO t2 (id,menu_name,menu_url,pId,mark,is_deleted) VALUES (1, '流量监测平台', '', 0, '导航菜单(一级菜单)','0') | 1 |

执行信息 EXECUTED | 2 | Execute failed | Execute: Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation | INSERT INTO t2 (id,menu_name,menu_url,pId,mark,is_deleted) VALUES (1, '流量监测平台', '', 0, '导航菜单(一级菜单)','0') | 0 |

wowkingah commented 7 years ago

多谢@gaoyan.gao大神指点,该问题因为backup需要解析binlog,还需要赋REPLICATION SLAVE, REPLICATION CLIENT权限。