# Metricbeat-6.6.0 "MySQL module" ("MySQL status metricset" can't connect to MySQL 8)

**URL:** <https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599>\
**Category:** Beats\
**Tags:** beats-module, metricbeat\
**Created:** [May 17, 2019, 1:19pm UTC](https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599 "2019-05-17T13:19:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergey\_Ambaryan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_ambaryan/32/46386_2.png) [@Sergey\_Ambaryan](https://discuss.elastic.co/u/Sergey_Ambaryan)\
**Post date:** [May 17, 2019, 1:19pm UTC](https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599/1 "2019-05-17T13:19:39Z")

</div>

Hi!  
I have **MySQL Ver 8.0.13** for Linux and i have installed and configured **Metricbeat-6.6.0** with enabled module "mysql" (enabled metricsets "- status").

But, when i run **metricbeat** - in **debug log** i see next part of message:

```
"error": {
    "message": "this user requires mysql native password authentication."
},

```

For this user, in mysql, enabled " **mysql\_native\_password**" auth plugin.

I'm change auth plugin to " **caching\_sha2\_password**", and in metricbeat debug log i see next part of message:

```
"error": {
    "message": "this authentication plugin is not supported"
},

```

Okey, I'm change auth plugin to " **sha256\_password**", and in metricbeat debug log i see next part of message:

```
"error": {
    "message": "this authentication plugin is not supported"
},

```

...what im doing wrong?  
I'm sure that all configuration files are correct, because all another metricbeat function's work's fine!

/etc/metricbeat/mysql.yml file content:

```
- module: 
  metricsets:
    - status
  period: 10s
  hosts: ["username:password@tcp(127.0.0.1:3306)/"]
```

---

<div class="post-metadata">

**Author:** ![Sergey\_Ambaryan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_ambaryan/32/46386_2.png) [@Sergey\_Ambaryan](https://discuss.elastic.co/u/Sergey_Ambaryan)\
**Post date:** [May 17, 2019, 4:13pm UTC](https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599/2 "2019-05-17T16:13:37Z")

</div>

I enable **mysql\_native\_password** plugin in **MySQL** for this **user** and changed **/etc/metricbeat/mysql.yml** file content to this:

```
- module: mysql
  metricsets:
    - status
  period: 10s
  hosts: ["tcp(localhost:3306)/?allowNativePasswords=true"]

  username: my_username
  password: my_password

```

...and all work **fine**!  
Please, add info about **?allowNativePasswords=true** to documentation 🙏

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 17, 2019, 9:00pm UTC](https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599/3 "2019-05-17T21:00:03Z")

</div>

I think you should open a github issue and ask if metricbeat should support the new auth in mysql 8 no?

Not an expert in mysql but I think it doesnt work unless you REVERT that user to this plugin because mysql 8 now uses a better auth. My thinking is, metricbeat should support mysql 8 default auth without requiring you to downgrade security.

I might have this all wrong though but it would be worth a github issue to clarify.

What do you think? Whats the new auth in mysql 8 and is it more secure than mysql\_native\_password ?  
If it is you just had to downgrade security in your DB server to make metricbeat work?

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 17, 2019, 9:02pm UTC](https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599/4 "2019-05-17T21:02:14Z")

</div>

also when you ask for a doc change I think you need to open a github issue too.

---

<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:** [June 14, 2019, 9:02pm UTC](https://discuss.elastic.co/t/metricbeat-6-6-0-mysql-module-mysql-status-metricset-cant-connect-to-mysql-8/181599/5 "2019-06-14T21:02:27Z")

</div>

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