# Load data from mysql to elasticsearch with logstash

**URL:** https://discuss.elastic.co/t/load-data-from-mysql-to-elasticsearch-with-logstash/228665
**Category:** Logstash
**Created:** [April 18, 2020, 5:43pm UTC](https://discuss.elastic.co/t/load-data-from-mysql-to-elasticsearch-with-logstash/228665 "2020-04-18T17:43:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hiba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiba/32/110919_2.png) [@hiba](https://discuss.elastic.co/u/hiba)
#### Post date: [April 18, 2020, 5:43pm UTC](https://discuss.elastic.co/t/load-data-from-mysql-to-elasticsearch-with-logstash/228665/1 "2020-04-18T17:43:27Z")

</div>

Hi,  
I want to load data from mysql ( mysql wampserver ) into elasticsearch via logstash.  
After downloading elasticsearch ,kibana and logstash ,i installed "com.mysql.jdbc\_5.1.5" (JDBC).  
_ **test.conf** _  
input {  
jdbc {  
jdbc\_connection\_string =\>""jdbc:mysql://localhost:3306/giata\_db""  
jdbc\_user =\> "root"  
jdbc\_password =\> ""  
jdbc\_driver\_library =\> "C:\Users\hiba\OneDrive\ELK\logstash-7.0.0\logstash-7.0.0\bin\com.mysql.jdbc\_5.1.5.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
statement =\> "SELECT \* FROM countries"  
}  
}  
output{  
elasticsearch{  
hosts =\> ["localhost:9200"]  
index =\> "voyage2000"  
}  
stdout { codec =\> rubydebug }  
}

 ![Capturelog](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f71bcd5f9d759ceb255e99ad3c2bc4d6fa1d54b1.png)

any help please !

---

<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: [May 16, 2020, 5:43pm UTC](https://discuss.elastic.co/t/load-data-from-mysql-to-elasticsearch-with-logstash/228665/2 "2020-05-16T17:43:31Z")

</div>

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