错误日志.

2024-07-24_11:55:51 INFO Opening DatabasePool 'mysql'. Asynchronous connections: 1, synchronous connections: 2.
2024-07-24_11:55:51 ERROR Could not connect to MySQL database at 127.0.0.1: Authentication plugin 'caching_sha2_password' cannot be loaded: 找不到指定的模块。
2024-07-24_11:55:51 ERROR DatabasePool mysql NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile for specific errors. Read wiki at http://collab.kpsn.org/display/tc/TrinityCore+Home

错误原因

 “Authentication plugin ‘caching_sha2_password’ cannot be loaded” 时,这意味着你的MySQL客户端不支持或未正确配置用于连接MySQL服务器的caching_sha2_password身份验证插件。caching_sha2_password是MySQL 8.0开始引入的默认身份验证方式,以增强安全性,但某些旧版本的MySQL客户端库或连接工具可能不支持它。

解决方案

修改MySQL服务器的用户认证插件如果你有MySQL服务器的管理员权限,可以将特定用户的认证插件改回旧的mysql_native_password:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
root:mysql用户名
password:数据库密码

刷新权限

FLUSH PRIVILEGES;