做查询时没有数据出来,后台报错
报错信息:
org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Caused by: java.sql.SQLException: Access denied for user 'mcc'@'localhost' (using password: YES)
原因:
因为项目是从SVN上导下来的,配置文件里连接数据库的数据库名和密码没有改成自己本地数据库的数据库名和密码
解决:将数据库名和密码改过来就好了
(已经第二次遇到这个问题了,记录一下)
点此欢迎光临我的个人网站【一几文星球】
微信公众号,欢迎关注,一起学习。