metricsign
Start free
High severityauthentication

Power BI Refresh Error:
1251

What does this error mean?

The MySQL client uses an old authentication plugin incompatible with the server's caching_sha2_password default.

Common causes

  • 1MySQL 8.0+ defaults to caching_sha2_password but the client driver only supports mysql_native_password
  • 2Old JDBC or Python connector versions that predate caching_sha2_password support
  • 3ADF's MySQL connector version is outdated relative to the MySQL 8.0 server

How to fix it

  1. 1Step 1: Alter the user to use the legacy plugin: `ALTER USER 'your_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;`
  2. 2Step 2: Or set the default auth plugin globally: add `default_authentication_plugin=mysql_native_password` to `my.cnf` under `[mysqld]` and restart MySQL.
  3. 3Step 3: Update the client connector/driver to a version that supports caching_sha2_password (preferred long-term fix).

Frequently asked questions

Is it safe to use mysql_native_password in MySQL 8.0?

It works but is less secure. Upgrade your drivers to support caching_sha2_password and remove the legacy plugin setting as soon as feasible.

Why did this error appear after upgrading MySQL?

MySQL 8.0 changed the default authentication plugin from mysql_native_password to caching_sha2_password. Older clients and drivers do not support the new protocol.

How do I check which auth plugin a user is using?

Run `SELECT user, plugin FROM mysql.user WHERE user='your_user';` to see the current authentication plugin.

Official documentation: https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html

Other authentication errors