After upgrading to MySQL 8 I get the following error from my logstash pod:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
[2021-07-30T09:31:38,885][ERROR][logstash.inputs.jdbc ][main][f5be98a71736413fe373dedbd282a1ee25b169118a57eab4e43cc9337c337a2c] Unable to connect to database. Trying again {:error_message=>"Java::JavaSql::SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up."}
I upgraded to MySQL connector version 8.0.23 to match my MySQL version 8.0.23. Using logstash 7.8.1.
Relevant part of the config:
jdbc_driver_library => "/opt/bitnami/logstash/logstash-core/lib/jars/mysql-connector-java.jar"
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://mydb.database:3306/dbname?zeroDateTimeBehavior=convertToNull&useCursorFetch=true&autoReconnect=true&sessionVariables=group_concat_max_len=150000"
I tried it with jdbc_driver_library commented out too.
I'm not sure why I get the warning about the Java class name being wrong when jdbc_driver_class is already set to com.mysql.cj.jdbc.Driver