# MySQL Required Privileges?

**URL:** <https://discuss.elastic.co/t/mysql-required-privileges/118530>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [February 5, 2018, 9:52pm UTC](https://discuss.elastic.co/t/mysql-required-privileges/118530 "2018-02-05T21:52:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![weldon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weldon/32/27386_2.png) [@weldon](https://discuss.elastic.co/u/weldon)\
**Post date:** [February 5, 2018, 9:52pm UTC](https://discuss.elastic.co/t/mysql-required-privileges/118530/1 "2018-02-05T21:52:43Z")

</div>

I'm new to elastic and metricbeat, but I'd like to set up the mysql module with a user account that has the least required privileges. The example shows "root@" and the question about privileges was never answered in this earlier thread…

Stuck with MySQL permission

Does anyone know the incantation to create a mysql user with the correct privileges for the metricbeat mysql module to collect stats?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 5, 2018, 10:38pm UTC](https://discuss.elastic.co/t/mysql-required-privileges/118530/2 "2018-02-05T22:38:50Z")

</div>

I believe the mysql status metricset only does `show global status;` and I think any user can run the query. So try a user with only the [GRANT USAGE](https://dev.mysql.com/doc/refman/5.5/en/privileges-provided.html#priv_usage) privilege.

---

<div class="post-metadata">

**Author:** ![weldon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weldon/32/27386_2.png) [@weldon](https://discuss.elastic.co/u/weldon)\
**Post date:** [February 5, 2018, 11:36pm UTC](https://discuss.elastic.co/t/mysql-required-privileges/118530/3 "2018-02-05T23:36:53Z")

</div>

Thanks, Andrew!

---

<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 5, 2018, 11:37pm UTC](https://discuss.elastic.co/t/mysql-required-privileges/118530/4 "2018-03-05T23:37:14Z")

</div>

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