How to do SSH key based authentication to MySQL in jdbc input plugin when using Logstash


(Deepti Jain) #1

MYSQL DB server has been set up to accept an SSH key while authenticating the user. WHen the jdbc input plugin tries to connect to the server it fails to establish the connection since there is no means to provide the key. What is the workaround or solution to this problem. The intent of using logstash is to to ingest data from MySQL into ES.

Here is the input section in logstash config file:-1:
jdbc {
jdbc_driver_library => "C:\Deepti\mysql-connector-java-6.0.6\mysql-connector-java-6.0.6-bin.jar"
jdbc_driver_class => "Java::com.mysql.cj.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://35.200.116.45:3306/rapp_product"
jdbc_user => "rapp_admin"
jdbc_password => "Aspl@101(%$#"
schedule => "* * * * *"
statement => "SELECT * FROM m_product_detail INNER JOIN m_product
ON (m_product_detail.product_id = m_product.product_id)
WHERE m_product.deleted_flag = 0 && m_product_detail.deleted_flag = 0 && m_product.active_flag = 1 && m_product_detail.active_flag = 1"
}


(system) #2

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