Im trying to use a jdbc input to migrate data to ES, I googled but not found a nice solution.
This is my conf file:
input { jdbc { jdbc_driver_library => "mysql-connector-java-5.1.36.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_connection_string => "jdbc:mysql://*.*.*.*:3306/log" jdbc_user => "user" jdbc_password => "pwd" jdbc_paging_enabled => true jdbc_page_size => 100000 #parameters => { "CharSet" => "gbk" , "Datetime" => "True"} schedule => "* * * * *" statement => "SELECT * from app_log where id > :sql_last_value" use_column_value => true tracking_column => id last_run_metadata_path => ".logstash_jdbc_last_run_prod" } } output { elasticsearch { index => app_log_prod } }
But when I start logStash , always show msg as below and no data inserted into my ES:
Java::JavaSql::SQLException: Incorrect key file for table '/tmp/#sql_c33_0.MYI'; try to repair it: SELECT count(*) AS
countFROM (SELECT * from app_log where id > 0) AS
t1LIMIT 1 {:level=>:error} Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::JavaSql::SQLException: Incorrect key file for table '/tmp/#sql_c33_0.MYI'; try to repair it>, :level=>:warn}
Can anybody help me? Thanks a billion