caching_sha2_password 🐬 MySQL

Authentication plugin 'caching_sha2_password' cannot be loaded

An old MySQL client/driver can’t use MySQL 8’s default authentication plugin.

Seen on: MySQL

Meaning

MySQL 8 defaults to caching_sha2_password. Old clients (MySQL 5.7 tools, old PHP mysqlnd, old Node mysql package, some GUI tools) only support mysql_native_password.

Common causes

  • Old client library or GUI tool
  • Old PHP version / mysql Node package (not mysql2)
  • Docker mysql:8 with legacy apps

⚡ Quick fix

  1. Upgrade the client/driver (Node: use mysql2)
  2. Or set the user to mysql_native_password (deprecated in 8.4)

Detailed fix by platform

MySQL

  1. ALTER USER 'app'@'%' IDENTIFIED WITH mysql_native_password BY 'StrongPass!';

How to diagnose

  1. Client — Which library/tool and version?
  2. Plugin — User's plugin

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.