# How do I connect my MySQL database to Elasticsearch (Cloud)

**URL:** <https://discuss.elastic.co/t/how-do-i-connect-my-mysql-database-to-elasticsearch-cloud/236249>\
**Category:** Elasticsearch\
**Created:** [June 9, 2020, 1:39am UTC](https://discuss.elastic.co/t/how-do-i-connect-my-mysql-database-to-elasticsearch-cloud/236249 "2020-06-09T01:39:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lenny\_Parisi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lenny_parisi/32/46277_2.png) [@Lenny\_Parisi](https://discuss.elastic.co/u/Lenny_Parisi)\
**Post date:** [June 9, 2020, 1:39am UTC](https://discuss.elastic.co/t/how-do-i-connect-my-mysql-database-to-elasticsearch-cloud/236249/1 "2020-06-09T01:39:01Z")

</div>

I'm new to Elasticsearch and have a very rough understanding of how it works, so I'm not even sure if it's right for me. Does anyone know how to establish a live feed from my MySQL database to Elasticsearch (currently served on their cloud system)? My database has many tables with relationships so I'm not sure how to incorporate the relationships in Elasticsearch either...

I essentially want users to be able to search through all the data we have in our database with ease and flexibility. Is Elasticsearch even the right tool for this kind of thing?

I'm using Graphql and Express for the backend, and React for the frontend (not that it really matters)

---

<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:** [June 9, 2020, 7:40am UTC](https://discuss.elastic.co/t/how-do-i-connect-my-mysql-database-to-elasticsearch-cloud/236249/2 "2020-06-09T07:40:49Z")

</div>

Welcome!

I shared most of my thoughts there: [http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/](http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/)

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

Have also a look at this ["live coding" recording](https://www.elastic.co/fr/blog/how-to-add-powerful-search-existing-sql-applications-elasticsearch-video-tutorial) which is using elastic cloud as well.

---

<div class="post-metadata">

**Author:** ![Lenny\_Parisi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lenny_parisi/32/46277_2.png) [@Lenny\_Parisi](https://discuss.elastic.co/u/Lenny_Parisi)\
**Post date:** [June 9, 2020, 3:07pm UTC](https://discuss.elastic.co/t/how-do-i-connect-my-mysql-database-to-elasticsearch-cloud/236249/3 "2020-06-09T15:07:39Z")

</div>

Thank you so much, this was very helpful! I didn't realize that I'd have to implement the database synchronization myself; I thought there was a plugin for that, so I guess that's where the confusion was coming from.

---

<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:** [July 7, 2020, 3:07pm UTC](https://discuss.elastic.co/t/how-do-i-connect-my-mysql-database-to-elasticsearch-cloud/236249/4 "2020-07-07T15:07:48Z")

</div>

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