1. 程式人生 > >java.sql.SQLException: Access denied for user 'somebody'@'localhost' (using password: YES)

java.sql.SQLException: Access denied for user 'somebody'@'localhost' (using password: YES)

cep lex username host classname some body oot ive

這是之前配置的屬性文件:

driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/ssh
username=root
password=root

解決方案:將username改為其他的名稱即可

driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/ssh
user=root
password=root

java.sql.SQLException: Access denied for user 'somebody'@'localhost' (using password: YES)