maxwell连接不上mysql问题的解决
今天安装了maxwell死活连不上mysql 一直报错
[root@hadoop101 maxwell-1.25.0]# bin/maxwell --config /opt/module/maxwell-1.25.0/config.properties
Using kafka version: 1.0.0
01:06:42,977 WARN MaxwellMetrics - Metrics will not be exposed: metricsReportingType not configured.
01:07:13,462 ERROR Maxwell - SQLException: Connections could not be acquired from the underlying database!
[root@hadoop101 maxwell-1.25.0]#
没错 就这个错误“SQLException: Connections could not be acquired from the underlying database!”
我一直在想这是为什么,我端口号,用户名,都是正确的
host=‘hadoop103’
user=‘maxwell’
password=‘123456’
我实验了很多遍,一直报错,一直连不上,我把hadoop103换成指定的ip也不行。
百度排查了多次,最后发现是jar包的问题。
maxwell的lib目录下的jar包是这个mysql-connector-java-8.0.17.jar。
但是我的库的是mysql5.7,百度多次得知8.0的jar包无法连接5.7的数据库。
于是下载了5.7的jar包进行替换。替换后重启,问题解决