报这个问题的时候要注意看一下这个下面的具体报错信息。
问题一:Unable to load authentication plugin ‘caching_sha2_password’.(无法加载身份验证插件“ caching_sha2_password”。)
这个问题可能是由于项目中使用的mysql-connector-java驱动包的版本问题,一定要注意连接数据库的版本,因为随着mysql的不断完善,它的安全性也不断提高,低版本的驱动包无法进行验证。将驱动包的版本修改为对应的版本。
解决办法实例:
问题二:The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.