How to connect mysql database by logstash?

step 1.I installed logstash in c drive and create a
simple-out.conf file with this code
# file: simple-out.conf
input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc:postgresql://127.0.0.1:5432/sortable"
# The user we wish to execute our statement as
jdbc_user => "root"
jdbc_password => ""
# The path to our downloaded jdbc driver
jdbc_driver_library => "../lib/postgresql-9.4.1211.jre6.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "org.postgresql.Driver"
# our query
statement => "SELECT * from bookmarks"
}
}
output {
stdout { codec => json_lines }
}

step 2: Placed postgresql-9.4.1211.jre6.jar file in to lib directory.
step 3: Open cmd window and run this command
C:\logstash\bin>logstash -f c:\logstash\bin\simple-out.conf

Then we get command prompt return following error::
C:\logstash\bin>logstash -f simple-out.conf
io/console not supported; tty will not be manipulated
Settings: Default pipeline workers: 4
?[31mUnable to connect to database. Tried 1 times {:error_message=>"org.postgres
ql.Driver not loaded, try installing jdbc-postgres gem", :level=>:error}?[0m
?[31mPipeline aborted due to error {:exception=>#<Sequel::AdapterNotFound: org.p
ostgresql.Driver not loaded, try installing jdbc-postgres gem>, :backtrace=>["C:
/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/adapters/jdbc.rb
:59:in load_driver'", "C:/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/l ib/sequel/adapters/jdbc/postgresql.rb:3:in(root)'", "org/jruby/RubyKernel.java
:1040:in require'", "C:/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/li b/polyglot.rb:65:inrequire'", "C:/logstash/vendor/bundle/jruby/1.9/gems/sequel
-4.33.0/lib/sequel/database/connecting.rb:1:in (root)'", "C:/logstash/vendor/bu ndle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/database/connecting.rb:98:inload_
adapter'", "C:/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/ad
apters/jdbc.rb:361:in adapter_initialize'", "C:/logstash/vendor/bundle/jruby/1. 9/gems/sequel-4.33.0/lib/sequel/database/misc.rb:146:ininitialize'", "C:/logst
ash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/sequel/database/connecting.rb
:67:in connect'", "C:/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.33.0/lib/s equel/core.rb:108:inconnect'", "org/jruby/RubyKernel.java:1479:in loop'", "C: /logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.0.2/lib/logstash/pl ugin_mixins/jdbc.rb:109:injdbc_connect'", "C:/logstash/vendor/bundle/jruby/1.9
/gems/logstash-input-jdbc-3.0.2/lib/logstash/plugin_mixins/jdbc.rb:106:in jdbc_ connect'", "C:/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.0.2/l ib/logstash/plugin_mixins/jdbc.rb:158:inprepare_jdbc_connection'", "C:/logstas
h/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.0.2/lib/logstash/inputs/jdb
c.rb:167:in register'", "org/jruby/RubyArray.java:1613:ineach'", "C:/logstash
/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:
330:in start_inputs'", "C:/logstash/vendor/bundle/jruby/1.9/gems/logstash-core- 2.3.1-java/lib/logstash/pipeline.rb:329:instart_inputs'", "C:/logstash/vendor/
bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:180:in start_workers'", "C:/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-j ava/lib/logstash/pipeline.rb:136:inrun'"], :level=>:error}?[0m
stopping pipeline {:id=>"main"}
The signal HUP is in use by the JVM and will not work correctly on this platform
How to fixed this error?

What if you try using an absolute path to the jar file in your jdbc_driver_library option?

Thanks Magnus for quick reply.
My problem is solved and i replaced postgresql to mysql library

file: simple-out.conf

input {
jdbc {
jdbc_driver_library => "C:/logstash/lib/mysql-connector-java-5.1.38-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://127.0.0.1:3306/lenderplatform_dev"
jdbc_user => "root"
jdbc_password => ""
statement => "SELECT * FROM lenderplatform_dev.loans"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "lenderplatform_dev"
document_type => "loans"
}
stdout { codec => json_lines }
}