mybatis access denied问题

遇到如下错误:

com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/arcsoft/web/adminconsolews/caas/model/OAuthUser.xml.  
--- The error occurred while executing query.  
--- Check the    SELECT user_id uid,username userName,email,mobile,unified_id   unifiedId,create_time registerTime,status,region,last_op_time   lastOpTime,check_code checkCode,active_time activeTime,vip_num vipnum   FROM oauth_user WHERE 1=1      and    (email like    concat('%', ?, '%') or mobile like concat('%', ?, '%') )                      ORDER BY create_time desc     .  
--- Check the SQL Statement (preparation failed).  
--- Cause: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'172.29.31.217' (using password: YES))


Access denied for user 'root'@'172.29.31.217' (using password: YES)这句话极具迷惑性,不仔细看,还以为是本机请求172.29.31.217上mysql server的root账户被拒绝了。

不仔细看就倒霉了,我花了一下午查问题,结果问题实质是本机ip地址为172.29.31.217,以root账号请求mysql server,改成其他的账号就ok了。


你可能感兴趣的:(java)