您的位置:首页 > 数据库 > MySQL

Could not create connection to database server. Attempted reconnect 3 times. Giving up.

2017-08-21 20:02 876 查看
做查询时没有数据出来,后台报错
报错信息:

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上导下来的,配置文件里连接数据库的数据库名和密码没有改成自己本地数据库的数据库名和密码

解决:将数据库名和密码改过来就好了

(已经第二次遇到这个问题了,记录一下)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  数据库连接 mysql
相关文章推荐