# mariadb.jdbc.Driver not loaded

**URL:** <https://discuss.elastic.co/t/mariadb-jdbc-driver-not-loaded/241866>\
**Category:** Logstash\
**Created:** [July 20, 2020, 9:26am UTC](https://discuss.elastic.co/t/mariadb-jdbc-driver-not-loaded/241866 "2020-07-20T09:26:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fahad\_Ibrahim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fahad_ibrahim/32/72427_2.png) [@Fahad\_Ibrahim](https://discuss.elastic.co/u/Fahad_Ibrahim)\
**Post date:** [July 20, 2020, 9:26am UTC](https://discuss.elastic.co/t/mariadb-jdbc-driver-not-loaded/241866/1 "2020-07-20T09:26:13Z")

</div>

Hi All,

I am trying to establish connectivity between mariadb and ELK. PFB conf file.

```auto
    input { 
  jdbc { 
    jdbc_validate_connection => true 
    jdbc_driver_library => "D:/ELK/logstash/logstash-core/lib/jars/mariadb-java-client-2.5.4.jar" 
    jdbc_driver_class => "org.mariadb.jdbc.Driver" 
    jdbc_connection_string => "jdbc:mariadb://localhost:3307/dbname" 
    jdbc_user => "root" 
    jdbc_password => "password" 
    schedule => "*/1 * * * *" 
    statement => "SELECT * from test" 
    sql_log_level => "debug" 
    record_last_run => true 
  } 
} 

```

```auto
output { 
  stdout { codec => json_lines }
  elasticsearch { 
      hosts => ["elasticsearch:9200"] 
      index => "mariadb-%{+YYYY.MM}" 
  } 
} 

```

```auto
PFB error
    [2020-07-20T11:21:52,136][ERROR][logstash.javapipeline][main][7210bc70672f880c3a57d8b8cdafd46b626dc0f330fa9154514c4fd986cda21f] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"root", schedule=>"*/1 * * * *", jdbc_validate_connection=>true, jdbc_password=><password>, statement=>"SELECT * from test", jdbc_driver_library=>"D:/ELK/logstash/logstash-core-plugin-api/mariadb-java-client-2.5.4.jar", jdbc_connection_string=>"jdbc:mariadb://localhost:3307/dbname", sql_log_level=>"debug", id=>"7210bc70672f880c3a57d8b8cdafd46b626dc0f330fa9154514c4fd986cda21f", jdbc_driver_class=>"org.mariadb.jdbc.Driver", record_last_run=>true, enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_fcad7c90-81e3-4377-9257-023cad590011", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"C:\\Users\\10113/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, lowercase_column_names=>true, use_prepared_statements=>false>
  Error: org.mariadb.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
  Exception: LogStash::PluginLoadingError
  Stack: D:/ELK/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:159:in `load_driver'
D:/ELK/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/inputs/jdbc.rb:273:in `run'
D:/ELK/logstash/logstash-core/lib/logstash/java_pipeline.rb:346:in `inputworker'
D:/ELK/logstash/logstash-core/lib/logstash/java_pipeline.rb:337:in `block in start_input'

```

Appreciate the support. Thanks

---

<div class="post-metadata">

**Author:** ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)\
**Post date:** [July 20, 2020, 2:50pm UTC](https://discuss.elastic.co/t/mariadb-jdbc-driver-not-loaded/241866/2 "2020-07-20T14:50:03Z")

</div>

Have you tried it without the `jdbc_driver_library` parameter yet?

---

<div class="post-metadata">

**Author:** ![Fahad\_Ibrahim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fahad_ibrahim/32/72427_2.png) [@Fahad\_Ibrahim](https://discuss.elastic.co/u/Fahad_Ibrahim)\
**Post date:** [July 20, 2020, 3:31pm UTC](https://discuss.elastic.co/t/mariadb-jdbc-driver-not-loaded/241866/3 "2020-07-20T15:31:30Z")

</div>

@Jenni: No....I haven't....If there is any reference, pls share... I will look for other options as well.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2020, 3:37pm UTC](https://discuss.elastic.co/t/mariadb-jdbc-driver-not-loaded/241866/4 "2020-08-17T15:37:24Z")

</div>

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