# How elasticsearch will fetch data from MySQL database?

**URL:** <https://discuss.elastic.co/t/how-elasticsearch-will-fetch-data-from-mysql-database/139951>\
**Category:** Logstash\
**Created:** [July 13, 2018, 1:25pm UTC](https://discuss.elastic.co/t/how-elasticsearch-will-fetch-data-from-mysql-database/139951 "2018-07-13T13:25:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 16, 2018, 7:12am UTC](https://discuss.elastic.co/t/how-elasticsearch-will-fetch-data-from-mysql-database/139951/4 "2018-07-16T07:12:48Z")

</div>

> I have done direct connection with MySQL DB

That's not what I meant. I meant direct connection from **your application** to elasticsearch. I did not mean reading the data later with Logstash and send to elasticsearch.

The former is "real time". The later is not.

Next time please format your code according to the guide (read the [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21/1)). I'm editing your post. But your indentation is wrong which makes harder to read your config.

Then, I'm moving your question to #logstash as it's a logstash question.

---

_[View the full topic](https://discuss.elastic.co/t/how-elasticsearch-will-fetch-data-from-mysql-database/139951)._
