# How to use packetbeat to monitor mysql of docker container?

**URL:** <https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968>\
**Category:** Beats\
**Tags:** docker, packetbeat\
**Created:** [June 28, 2019, 4:10am UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968 "2019-06-28T04:10:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![meng\_liu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meng_liu/32/45610_2.png) [@meng\_liu](https://discuss.elastic.co/u/meng_liu)\
**Post date:** [June 28, 2019, 4:10am UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968/1 "2019-06-28T04:10:13Z")

</div>

Mysql and packetbeat be installed on the same machine!

Mysql is started in docker container, and the packetbeat is installed on local machine. Local machine's 3306 is mapping mysql of container's 3306, i use packetbeat to monitor mysql protocol, config the 3306, but can't get any data.

configuration:

```auto
packetbeat.interfaces.device: any

packetbeat.flows:
  enabled: false
  timeout: 30s
  period: 10s

packetbeat.protocols:
- type: mysql
  ports: [3306]

output.console:
   enabled: true
   pretty: true

```

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [June 28, 2019, 3:20pm UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968/2 "2019-06-28T15:20:37Z")

</div>

Hello, thanks for reaching out about packetbeat. Could you please provide some more information about your setup?

- What version of packetbeat are you running?
- Do you receive any errors from packetbeat?

---

<div class="post-metadata">

**Author:** ![meng\_liu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meng_liu/32/45610_2.png) [@meng\_liu](https://discuss.elastic.co/u/meng_liu)\
**Post date:** [July 8, 2019, 2:07am UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968/3 "2019-07-08T02:07:20Z")

</div>

I use heartbeat-7.1.1-linux-x86\_64, not errors received!

I just want to know if the packetbeat can monitor mysql protocol in docker container.

---

<div class="post-metadata">

**Author:** ![meng\_liu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meng_liu/32/45610_2.png) [@meng\_liu](https://discuss.elastic.co/u/meng_liu)\
**Post date:** [July 16, 2019, 3:43am UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968/4 "2019-07-16T03:43:06Z")

</div>

I have found the problem, it is the same situation about MySQL&SSL, according to [MySQL&SSL](https://discuss.elastic.co/t/mysql-ssl/117726)

---

<div class="post-metadata">

**Author:** ![elan](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@elan](https://discuss.elastic.co/u/elan)\
**Post date:** [August 6, 2019, 5:37pm UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968/5 "2019-08-06T17:37:24Z")

</div>

Hi....I have the same this question....plus i live this platform

---

<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:** [September 3, 2019, 5:37pm UTC](https://discuss.elastic.co/t/how-to-use-packetbeat-to-monitor-mysql-of-docker-container/187968/6 "2019-09-03T17:37:34Z")

</div>

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