報錯信息:
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上導下來的,配置文件裏連接數據庫的數據庫名和密碼沒有改成自己本地數據庫的數據庫名和密碼
解決:將數據庫名和密碼改過來就好了
(已經第二次遇到這個問題了,記錄一下)