PHPmyadmin登录报错:method unknown to the client [caching_sha2_password]
    文章作者:恒爱云[恒爱网络] 阅读次数:3 发布时间:2026-6-9

    PHPmyadmin登录MYSQL数据库报错:mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]


    从 MySQL 8.0 开始,默认的认证插件是caching_sha2_password,而旧的 PHP 客户端库(例如 PHP 5.x 或某些 PHP 7.x 版本)可能不支持这个新的认证方法。


    1. 升级 PHP

    确保你的 PHP 版本至少是 PHP 7.4 或更高。