Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password:

今天运行mybatis时出了个错

先发报错内容:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))  ### The error may involve com.springmvc.dao.UserinfoMapper.selectSelective ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:980) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870) javax.servlet.http.HttpServlet.service(HttpServlet.java:660) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

上网找了一下,发现有的是找属性配置文件有没有错误,或者是重新配置一下mysql,

我的解决办法是启动另外一个mysql服务,问题就解决了。

刚开始是这样的:

Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password:_第1张图片

启动另外一个服务:

Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password:_第2张图片

ok,问题就解决了,特此一贴。

 

你可能感兴趣的:(Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password:)