Access denied for user 'root'@'localhost' (using password: YES) 代码什么的都没错 这是怎么搞
来源:2-9 验证Sevice
慕勒0068115
2018-11-13
Nov 13 14:52:49 CST 2018 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Tue Nov 13 14:52:49 CST 2018 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Nov 13, 2018 2:52:49 PM com.mchange.v2.resourcepool.BasicResourcePoolAcquireTaskrunWARNING:com.mchange.v2.resourcepool.BasicResourcePoolAcquireTask run
WARNING: com.mchange.v2.resourcepool.BasicResourcePoolAcquireTaskrunWARNING:com.mchange.v2.resourcepool.BasicResourcePoolAcquireTask@6c590a2e – Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (2). Last acquisition attempt exception:
java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: YES)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:456)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
1回答
-
同学好,出线这个错误的原因有两个,第一个是root 的密码输入不正确,请先在mysql客户端里,用你的jdbc.properties对应的密码去登录,看看能否登录上;如果登录不上,需要你这边填入正确的密码;如果能登录上,请看看你的url是不是类似这样写的
jdbc:mysql://127.0.0.1:3306/o2o?useUnicode=true&characterEncoding=utf8
012018-11-14
相似问题