ERROR 14856 --- [reate-882003853] com.alibaba.druid.pool.DruidDataSource : create connection error, url: jdbc:mysql://localhost:3306/xhb?useUnicode=true&characterEncoding=UTF-8, errorCode 1045, state 28000
java.sql.SQLException: Access denied for user 'root  '@'localhost' (using password: YES)
errorCode 1045, state 28000
步骤一:
未开启远程操作权限
- win+R->cmd进入登录自己的mysql:
输入命令:mysql -u root -p ****(输入自己的密码)
- 输入远程命令:GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%'IDENTIFIED BY 'mypassword' WITH GRANT OPTION;(输入自己的用户名和密码)
- 刷新:flush privileges;
步骤二:
需要在项目的application.yml配置中加上:&useSSL=false&serverTimezone=UTC
步骤三:
按如下操作
运行正常了