報錯Exception during pool initialization.
java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
報錯與數據庫有關的,應該是從MySQL 8.0.4開始, 默認的認證插件從mysql_native_password 變爲caching_sha2_password.
參考https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html,創建新用戶和密碼
參考sql:
CREATE USER 'sha2user'@'localhost'IDENTIFIED WITH caching_sha2_password BY 'password';
root賬號修改爲caching_sha2_password的任然不行。
進入mysql命令行,使用如下命令解決:
ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';