开发者社区> 问答> 正文

授权了用户canal,mysql5.7可以链接,但是8.0.14报异常

环境信息

canal version 1.1.3-snatshop mysql version 8.0.14

mysql已经执行下列语句: CREATE USER canal IDENTIFIED BY 'canal'; GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON . TO 'canal'@'%'; GRANT ALL PRIVILEGES ON . TO 'canal'@'%' ; FLUSH PRIVILEGES;

授权了用户canal,mysql5.7可以链接,但是8.0.14报异常,在之前的版本也看到类似问题,但是这里没法应用

2019-04-03 13:25:59.063 [destination = example , address = /****:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /47.107.227.75:3306 has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /47.107.227.75:3306 failure Caused by: java.io.IOException: connect /:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:82) ~[canal.parse.driver-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:89) ~[canal.parse-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:86) ~[canal.parse-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:175) ~[canal.parse-1.1.3-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] Caused by: java.io.IOException: Error When doing Client Authentication:ErrorPacket [errorNumber=1045, fieldCount=-1, message=Access denied for user 'canal'@'****' (using password: YES), sqlState=28000, sqlStateMarker=#] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.negotiate(MysqlConnector.java:250) ~[canal.parse.driver-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:79) ~[canal.parse.driver-1.1.3-SNAPSHOT.jar:na] ... 4 common frames omitted 2019-04-03 13:25:59.063 [destination = example , address = /****:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect /:3306 failure Caused by: java.io.IOException: connect /***:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:82) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:89) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:86) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:175) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Error When doing Client Authentication:ErrorPacket [errorNumber=1045, fieldCount=-1, message=Access denied for user 'canal'@'****' (using password: YES), sqlState=28000, sqlStateMarker=#] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.negotiate(MysqlConnector.java:250) at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:79) ... 4 more

原提问者GitHub用户windyyong

展开
收起
古拉古拉 2023-05-08 13:33:18 85 0
1 条回答
写回答
取消 提交回答
  • 解决了,是mysql8启用了新的密码认证,所以可以在mysql8创建用户时指定认证方式

    https://hacpai.com/article/1529724574297

    原回答者GitHub用户windyyong

    2023-05-09 17:42:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像