# Data Transfer MySQL

**URL:** <https://discuss.elastic.co/t/data-transfer-mysql/119909>\
**Category:** Elasticsearch\
**Created:** [February 15, 2018, 5:37am UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909 "2018-02-15T05:37:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![josempolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josempolm/32/27755_2.png) [@josempolm](https://discuss.elastic.co/u/josempolm)\
**Post date:** [February 15, 2018, 5:37am UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/1 "2018-02-15T05:37:13Z")

</div>

Hello there,

How can I transfer data from Elasticsearch to MySQL?

Best regards.

---

<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:** [February 15, 2018, 6:29am UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/2 "2018-02-15T06:29:36Z")

</div>

Nothing OOTB I think.

You need to use the Scroll API to get all documents, then send the JSON to MySQL if you just want to store JSON there.  
Or extract from the Json all the values to fill your sql model.

---

<div class="post-metadata">

**Author:** ![josempolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josempolm/32/27755_2.png) [@josempolm](https://discuss.elastic.co/u/josempolm)\
**Post date:** [February 15, 2018, 8:25am UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/3 "2018-02-15T08:25:13Z")

</div>

> [@dadoonet](#):
>
> Or extract from the Json all the values to fill your sql model.

Is there a way to do that? @dadoonet

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 15, 2018, 8:30am UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/4 "2018-02-15T08:30:56Z")

</div>

I agree with David that there most likely isn't anything available out of the box. I would recommend creating a script/application using one of the language clients.

---

<div class="post-metadata">

**Author:** ![josempolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josempolm/32/27755_2.png) [@josempolm](https://discuss.elastic.co/u/josempolm)\
**Post date:** [February 15, 2018, 11:20am UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/5 "2018-02-15T11:20:02Z")

</div>

> [@dadoonet](#):
>
> Nothing OOTB I think.

Thank you for your response. 😊

> [@Christian\_Dahlqvist](#):
>
> I agree with David that there most likely isn't anything available out of the box. I would recommend creating a script/application using one of the language clients.

[Sample](https://github.com/NLPchina/elasticsearch-sql) would such projects help? 🤨

---

<div class="post-metadata">

**Author:** ![matt.veitas](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@matt.veitas](https://discuss.elastic.co/u/matt.veitas)\
**Post date:** [February 15, 2018, 12:49pm UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/6 "2018-02-15T12:49:32Z")

</div>

You can look at using something like this if you need to do some replication: [http://debezium.io/docs/connectors/mysql/](http://debezium.io/docs/connectors/mysql/)

---

<div class="post-metadata">

**Author:** ![josempolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josempolm/32/27755_2.png) [@josempolm](https://discuss.elastic.co/u/josempolm)\
**Post date:** [February 15, 2018, 1:36pm UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/7 "2018-02-15T13:36:51Z")

</div>

> [@matt.veitas](#):
>
> You can look at using something like this if you need to do some replication:

What is this?

---

<div class="post-metadata">

**Author:** ![josempolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josempolm/32/27755_2.png) [@josempolm](https://discuss.elastic.co/u/josempolm)\
**Post date:** [February 15, 2018, 2:32pm UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/8 "2018-02-15T14:32:18Z")

</div>

Kibana could it be a solution for this? 🙏 @dadoonet @Christian_Dahlqvist

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 15, 2018, 2:33pm UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/9 "2018-02-15T14:33:29Z")

</div>

No. I think you will need to develop a script that uses scan/scroll to retrieve the data and then transform it into the correct structure before writing it to your database.

---

<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 15, 2018, 2:34pm UTC](https://discuss.elastic.co/t/data-transfer-mysql/119909/10 "2018-03-15T14:34:14Z")

</div>

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