mysql 修改密码数据源无法连接
刚修改了mysql数据库root密码,linux命令行,navcat都可以正常连接。但是java代码里的数据源报
Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)\n### The error may exist in file [/home/hxs/app/api/WEB-INF/classes/mapper/userMapper.xml]\n### The error may involve net.znzkj.hxs.api.dao.UserMapper.queryUserByUserName\n### The error occurred while executing a query\n### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)" 我确定数据源密码都修改正确。