我使用springmvc,mybatis,mysql,我的mysql用户名是'root',密码未设置
this is my error content on the service:
this is mysql contect config in applicationContext.xml:

最佳答案

这不是mysql问题,您的xml文件中存在问题,只需删除以下行即可:

<property name="password" value="" / >


如果您不使用密码,请不要在代码中使用此行

关于mysql - java.sql.SQLException:用户'root'@'127.0.0.1'的访问被拒绝(使用密码:是),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44063463/

10-10 21:45
查看更多