"Error: com.mysql.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?"

It seems like you have several changes in-flight simultaneously, which makes helping you find a path forward a bit tricky:

  • changing the version of Logstash you're using across major versions
  • switching from the official docker images to images provided by a third party
  • changing how you're mounting your volumes to your docker containers

Additionally, in your 6.x logs, there is a message indicating that the driver class you are specifying is deprecated and that you should use a different class name moving forward; it is possible that an upgrade to Logstash, Java, or to the third-party packaging is causing the JDBC input plugin to no longer fall-through to the legacy driver class name:

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.