ava.sql.SQLException: Access denied for user 'joecc'@'localhost' (using password: YES)解决方法

今天在学习spring框架配置druid的时候碰到了问题ava.sql.SQLException: Access denied for user 'joecc'@'localhost' (using password: YES)解决方法
在网上看了几种方法,这里整合一下
一、配置文件中加入
useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
ava.sql.SQLException: Access denied for user 'joecc'@'localhost' (using password: YES)解决方法

二、配置文件中不要使用username,改成user
ava.sql.SQLException: Access denied for user 'joecc'@'localhost' (using password: YES)解决方法
原因是,username,被jvm占用,所以设置的username,不起作用!

最后上传一张配置截图
ava.sql.SQLException: Access denied for user 'joecc'@'localhost' (using password: YES)解决方法