# Can I connect MySQL database to elastic search?

**URL:** <https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743>\
**Category:** Kibana\
**Created:** [January 31, 2021, 8:09am UTC](https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743 "2021-01-31T08:09:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arun_sharma/32/78687_2.png) [@Arun\_Sharma](https://discuss.elastic.co/u/Arun_Sharma)\
**Post date:** [January 31, 2021, 8:09am UTC](https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743/1 "2021-01-31T08:09:22Z")

</div>

Can I connect a MySQL database with elasticsearch and will I able to make a search engine for organization after learning elasticsearch?  
For example : if I type on the search bar "how many employees joined today from Mumbai then it should display the answer same as Google is doing.

So please tell me the steps, how to develop this using elasticsearch?

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [January 31, 2021, 12:27pm UTC](https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743/2 "2021-01-31T12:27:42Z")

</div>

Welcome to the community @Arun_Sharma

I don't think you can do what you are thinking.

But you can ingest MySQL data into elasticsearch using [Logstash JDBC plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html). Then you are able to use all the search functionality against that data. For your specific example you would be able to do queries and visualizations to show `how many employees joined today from Mumbai` but by entering that in the search bar it wouldn't give you the answer you seek.

It would be more like `country.keyword: Mumbai`, setting the timefilter to `1 day` in [Discover](https://www.elastic.co/guide/en/kibana/current/discover.html) and that would return the list of people. Or you can create a metric [visualizations](https://www.elastic.co/guide/en/kibana/7.10/dashboard.html#create-panels-with-lens) that will do all that for you and just show you the number.

---

<div class="post-metadata">

**Author:** ![Arun\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arun_sharma/32/78687_2.png) [@Arun\_Sharma](https://discuss.elastic.co/u/Arun_Sharma)\
**Post date:** [January 31, 2021, 1:44pm UTC](https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743/3 "2021-01-31T13:44:16Z")

</div>

Sir Can you please tell me how do I develop this by using other methods.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 1, 2021, 12:43am UTC](https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743/4 "2021-02-01T00:43:42Z")

</div>

That's outside the scope of what we can offer here sorry.

---

<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:** [March 1, 2021, 12:44am UTC](https://discuss.elastic.co/t/can-i-connect-mysql-database-to-elastic-search/262743/5 "2021-03-01T00:44:40Z")

</div>

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