Logstash-7.8.1 - Couldn't connect MySQL jdbc on plugin logstash-integration-jdbc (5.0.5)

Hi guys.

I got error message below when I tried to connect MySQL RDS through logstash plugin.

please post here if you guys have any idea.

Thanks.

[2020-10-21T04:27:23,538][ERROR][logstash.inputs.jdbc     ] Unable to connect to database. Trying again {:error_message=>"Java::ComMysqlCjJdbcExceptions::CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."}

input {
  jdbc {
    jdbc_driver_library => "/usr/share/java/mysql-connector-java.jar"
    jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://rdshostnameurl:3306/IXDB"
#    jdbc_connection_string => "jdbc:mysql://ipaddress:3306/IXDB"
    jdbc_user => "mysqluser"
    jdbc_password => "mysqlpassword"
    jdbc_pool_timeout => 60
    connection_retry_attempts => 5
    statement_filepath => "/etc/logstash/templates/statistics_mysql.sql"
    schedule => "* * * * *"
  }
}
output {
  stdout{}
}

try this
jdbc_driver_library => "mysql-connector-java-5.1.36-bin.jar"

Thanks mate, I tried, even upgraded the plugin to 5.0.6, it didn't work.

mysql connection worked on command line.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.