# Metricbeat used or create mysql connections

**URL:** <https://discuss.elastic.co/t/metricbeat-used-or-create-mysql-connections/182853>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 27, 2019, 7:46am UTC](https://discuss.elastic.co/t/metricbeat-used-or-create-mysql-connections/182853 "2019-05-27T07:46:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [May 30, 2019, 3:14pm UTC](https://discuss.elastic.co/t/metricbeat-used-or-create-mysql-connections/182853/4 "2019-05-30T15:14:26Z")

</div>

By looking at the code, seems like each metricset in mysql metricbeat module opens its own connection to the database. Here is the part metricbeat mysql module calls for open connection: [https://github.com/elastic/beats/blob/master/metricbeat/module/mysql/mysql.go#L103](https://github.com/elastic/beats/blob/master/metricbeat/module/mysql/mysql.go#L103)

---

_[View the full topic](https://discuss.elastic.co/t/metricbeat-used-or-create-mysql-connections/182853)._
