启动之后报错
2018-01-05 15:36:23.539 [destination = example , address = ip/ip:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - prepare to find start position just show master status 2018-01-05 15:36:30.095 [destination = example , address = ip/ip:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address ip/ip:3306 has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: ErrorPacket [errorNumber=1142, fieldCount=-1, message=SHOW command denied to user 'shencesys'@'ip' for table 'slow_log', sqlState=42000, sqlStateMarker=#] with command: show create table mysql
.event
;show create table mysql
.func
;show create table mysql
.general_log
;show create table mysql
.help_category
;show create table mysql
.help_keyword
;show create table mysql
.help_relation
;show create table mysql
.help_topic
;show create table mysql
.proc
;show create table mysql
.slow_log
;show create table mysql
.time_zone
;show create table mysql
.time_zone_leap_second
;show create table mysql
.time_zone_name
;show create table mysql
.time_zone_transition
;show create table mysql
.time_zone_transition_type
; Caused by: java.io.IOException: ErrorPacket [errorNumber=1142, fieldCount=-1, message=SHOW command denied to user 'shencesys'@'ip' for table 'slow_log', sqlState=42000, sqlStateMarker=#] with command: show create table mysql
.event
;show create table mysql
.func
;show create table mysql
.general_log
;show create table mysql
.help_category
;show create table mysql
.help_keyword
;show create table mysql
.help_relation
;show create table mysql
.help_topic
;show create table mysql
.proc
;show create table mysql
.slow_log
;show create table mysql
.time_zone
;show create table mysql
.time_zone_leap_second
;show create table mysql
.time_zone_name
;show create table mysql
.time_zone_transition
;show create table mysql
.time_zone_transition_type
; at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.queryMulti(MysqlQueryExecutor.java:109) ~[canal.parse.driver-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.queryMulti(MysqlConnection.java:93) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.dumpTableMeta(DatabaseTableMeta.java:173) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:127) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:72) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:170) ~[canal.parse-1.0.25.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] 2018-01-05 15:36:30.096 [destination = example , address = ip/ip:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: ErrorPacket [errorNumber=1142, fieldCount=-1, message=SHOW command denied to user 'shencesys'@'ip' for table 'slow_log', sqlState=42000, sqlStateMarker=#] with command: show create table mysql
.event
;show create table mysql
.func
;show create table mysql
.general_log
;show create table mysql
.help_category
;show create table mysql
.help_keyword
;show create table mysql
.help_relation
;show create table mysql
.help_topic
;show create table mysql
.proc
;show create table mysql
.slow_log
;show create table mysql
.time_zone
;show create table mysql
.time_zone_leap_second
;show create table mysql
.time_zone_name
;show create table mysql
.time_zone_transition
;show create table mysql
.time_zone_transition_type
; Caused by: java.io.IOException: ErrorPacket [errorNumber=1142, fieldCount=-1, message=SHOW command denied to user 'shencesys'@'ip' for table 'slow_log', sqlState=42000, sqlStateMarker=#] with command: show create table mysql
.event
;show create table mysql
.func
;show create table mysql
.general_log
;show create table mysql
.help_category
;show create table mysql
.help_keyword
;show create table mysql
.help_relation
;show create table mysql
.help_topic
;show create table mysql
.proc
;show create table mysql
.slow_log
;show create table mysql
.time_zone
;show create table mysql
.time_zone_leap_second
;show create table mysql
.time_zone_name
;show create table mysql
.time_zone_transition
;show create table mysql
.time_zone_transition_type
; at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.queryMulti(MysqlQueryExecutor.java:109) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.queryMulti(MysqlConnection.java:93) at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.dumpTableMeta(DatabaseTableMeta.java:173) at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:127) at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:72) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:170) at java.lang.Thread.run(Thread.java:745)
账号权限如下
mysql> show grants for shencesys; +---------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for shencesys@% | +---------------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON . TO 'shencesys'@'%' IDENTIFIED BY PASSWORD '***********************************' | | GRANT SELECT, LOCK TABLES, SHOW VIEW ON xbdchainfin
.* TO 'shencesys'@'%' | | GRANT SELECT ON performance_schema
.* TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.func
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.help_relation
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.time_zone_leap_second
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.time_zone_transition
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.help_keyword
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.slow_log
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.event
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.proc
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.general_log
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.help_category
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.help_topic
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.time_zone
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.time_zone_name
TO 'shencesys'@'%' | | GRANT SELECT ON mysql
.time_zone_transition_type
TO 'shencesys'@'%' | +---------------------------------------------------------------------------------------------------------------------------------------------------+
原提问者GitHub用户jinxiaoxin
show create table mysql.event;show create table mysql.func;show create table mysql.general_log;show create table mysql.help_category;show create table mysql.help_keyword;show create table mysql.help_relation;show create table mysql.help_topic;show create table mysql.proc;show create table mysql.slow_log;show create table mysql.time_zone;show create table mysql.time_zone_leap_second;show create table mysql.time_zone_name;show create table mysql.time_zone_transition;show create table mysql.time_zone_transition_type;
执行一下对应的sql
原回答者GitHub用户agapple
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。