已经更换了mysql的驱动到8.0.18版本但是还是有问题无法连接。
报错的内容
2022-03-16 18:58:19.830 [job-0] WARN DBUtil - test connection of [jdbc:mysql://10.30.XXX.153:3306/test_car] failed, forCode:[MYSQLErrCode-02], Description:[数据库服务的IP地址或者Port错误,请检查填写的IP地址和Port或者联系DBA确认IP地址和Port是否正确。如果是同步中心用户请联系DBA确认idb上录入的IP和PORT信息和数据库的当前实际信息是一致的]. - 具体错误信息为:com.myscj.jdbc.exceptions.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server..
2022-03-16 18:58:19.833 [job-0] ERROR RetryUtil - Exception when calling callable, 异常Msg:DataX无法连接对应的数据库,可能原因是:1) 配置的ip/port/database/jdbc错误,无法连接。2) 配置的username/password错误,鉴权失败。请和DBA确认该数据库的连接信息是否正确。
整个json任务文件内容:
{
"setting": {},
"job": {
"setting": {
"speed": {
"channel": 3
}
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username":"root",
"password":"XXXXX",
"column":[
"vin",
"brand"
],
"connection":[
{
"jdbcUrl":[ "jdbc:mysql://10.xxxx.XXXX.153:13306/test_car?useUnicode=true&characterEncodeing=UTF-8&useSSL=false&serverTimezone=GMT"
],
"table":[
"car_static_data"
]
}
]
}
},
"writer": {
"name": "hdfswriter",
"parameter": {
"column":[
{
"name":"vin",
"type":"string"
},
{
"name":"brand",
"type":"string"
}
],
"defaultFS": "hdfs://bmrdde-cluster",
"fileType": "orc",
"path": "/dtInsighteze/hive/warehouse/gcvdbc_teste.db/test_car_data",
"fileName": "test_static_data",
"writeMode": "append",
"fieldDelimiter": ",",
"compress":"snappy"
}
}
}
]
}
}