启动spring架构连接数据库时,报错:
java.sql.SQLException: Access denied for user 'root'@'172.16.2.20' (using password: YES)
解决:
1.在架构连接数据库的位置增加&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
url: jdbc:mysql://${myApp.uriDB}/smart?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
2.进入数据库执行
mysql> grant all privileges on *.* to root@'%' identified by 'root登录密码' with grant option;
mysql> FLUSH PRIVILEGES;
结束。
本文标签:java.sql.SQLException Access denied for user root@172.16.2.20 using password YES
原文链接:
版权说明: 本文由作者上传,本站仅提供存储服务,转载请注明原文链接