从 MySQL 8.0.4 开始,默认身份验证插件从 mysql\_native\_password 更改为caching\_sha2\_password。相应地,现在的 libmysqlclient 将使用 caching\_sha2\_password 作为默认的验证机制。**为什么这样做呢**... CREATE USER for sha2user@localhost: CREATE USER 'sha2user'@'localhost' IDENTIFIED WITH 'caching_sha2_password' AS '$Afnka//BGe\d3h\n<:MTEFNZ3U40FRyPrdT5V14x526MHPENmY5Tn0RbjwA16' REQUIRE NONE PASSWO...