我有一个本地MySQL社区服务器(8.0.11)运行在本地主机127.0.0.1:3306
。
(我创建了一个数据库并为其注册了一个用户)。我可以使用以下终端查询访问数据库:/mysql-u testuser-p
我能够访问服务器。
我使用Spring和JDBC使用以下代码做同样的事情:
private final String URL= "jdbc:mysql://127.0.0.1:3306/db_example?useSSL=false";
private final String DB_USERNAME = "testuser";
private final String DB_PASSWORD = "pass";
public void connectAndInsertToDB() {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (Exception e) {
System.out.println("JAVA: Class.forName() error");
e.printStackTrace();
}
try {
conn = DriverManager.getConnection(URL, DB_USERNAME, DB_PASSWORD);
} catch (SQLException e) {
System.out.println("Error in initializing a connection to MYSQL DB");
e.printStackTrace();
}
}
但是我得到了以下错误:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
23:03:28,603 ERROR [stderr] (default task-3) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
23:03:28,603 ERROR [stderr] (default task-3) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
23:03:28,604 ERROR [stderr] (default task-3) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
23:03:28,607 ERROR [stderr] (default task-3) at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
23:03:28,608 ERROR [stderr] (default task-3) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
23:03:28,608 ERROR [stderr] (default task-3) at com.mysql.jdbc.Util.getInstance(Util.java:387)
23:03:28,608 ERROR [stderr] (default task-3) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917)
23:03:28,609 ERROR [stderr] (default task-3) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
23:03:28,609 ERROR [stderr] (default task-3) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
23:03:28,609 ERROR [stderr] (default task-3) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
23:03:28,610 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2332)
23:03:28,611 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085)
23:03:28,611 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795)
23:03:28,611 ERROR [stderr] (default task-3) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
23:03:28,611 ERROR [stderr] (default task-3) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
23:03:28,612 ERROR [stderr] (default task-3) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
23:03:28,612 ERROR [stderr] (default task-3) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
23:03:28,612 ERROR [stderr] (default task-3) at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
23:03:28,612 ERROR [stderr] (default task-3) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
23:03:28,613 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
23:03:28,613 ERROR [stderr] (default task-3) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)
23:03:28,613 ERROR [stderr] (default task-3) at java.sql.DriverManager.getConnection(DriverManager.java:664)
23:03:28,613 ERROR [stderr] (default task-3) at java.sql.DriverManager.getConnection(DriverManager.java:247)
23:03:28,613 ERROR [stderr] (default task-3) at com.voice4.spring.security.config.core.Inventory.connectAndInsertToDB(Inventory.java:41)
23:03:28,614 ERROR [stderr] (default task-3) at com.voice4.spring.security.config.core.KomalController.indexPage(KomalController.java:36)
23:03:28,614 ERROR [stderr] (default task-3) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:03:28,614 ERROR [stderr] (default task-3) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
23:03:28,614 ERROR [stderr] (default task-3) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
23:03:28,614 ERROR [stderr] (default task-3) at java.lang.reflect.Method.invoke(Method.java:497)
23:03:28,615 ERROR [stderr] (default task-3) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
23:03:28,615 ERROR [stderr] (default task-3) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
23:03:28,615 ERROR [stderr] (default task-3) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
23:03:28,616 ERROR [stderr] (default task-3) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
23:03:28,616 ERROR [stderr] (default task-3) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
23:03:28,616 ERROR [stderr] (default task-3) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
23:03:28,616 ERROR [stderr] (default task-3) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
23:03:28,617 ERROR [stderr] (default task-3) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
23:03:28,617 ERROR [stderr] (default task-3) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
23:03:28,617 ERROR [stderr] (default task-3) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
23:03:28,617 ERROR [stderr] (default task-3) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
23:03:28,618 ERROR [stderr] (default task-3) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
23:03:28,618 ERROR [stderr] (default task-3) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
23:03:28,618 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
23:03:28,619 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
23:03:28,619 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
23:03:28,620 ERROR [stderr] (default task-3) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
23:03:28,621 ERROR [stderr] (default task-3) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
23:03:28,621 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,622 ERROR [stderr] (default task-3) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
23:03:28,622 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,622 ERROR [stderr] (default task-3) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
23:03:28,623 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,623 ERROR [stderr] (default task-3) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
23:03:28,624 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,624 ERROR [stderr] (default task-3) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
23:03:28,625 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,625 ERROR [stderr] (default task-3) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
23:03:28,625 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,625 ERROR [stderr] (default task-3) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
23:03:28,625 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,626 ERROR [stderr] (default task-3) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
23:03:28,626 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,626 ERROR [stderr] (default task-3) at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
23:03:28,626 ERROR [stderr] (default task-3) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
23:03:28,627 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,627 ERROR [stderr] (default task-3) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
23:03:28,627 ERROR [stderr] (default task-3) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
23:03:28,627 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,627 ERROR [stderr] (default task-3) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
23:03:28,627 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,628 ERROR [stderr] (default task-3) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
23:03:28,628 ERROR [stderr] (default task-3) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
23:03:28,628 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
23:03:28,628 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
23:03:28,628 ERROR [stderr] (default task-3) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
23:03:28,629 ERROR [stderr] (default task-3) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
23:03:28,629 ERROR [stderr] (default task-3) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
23:03:28,629 ERROR [stderr] (default task-3) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
23:03:28,629 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
23:03:28,629 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
23:03:28,630 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
23:03:28,630 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
23:03:28,630 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
23:03:28,630 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
23:03:28,630 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
23:03:28,631 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
23:03:28,631 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
23:03:28,631 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
23:03:28,631 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
23:03:28,632 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
23:03:28,632 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
23:03:28,633 ERROR [stderr] (default task-3) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
23:03:28,633 ERROR [stderr] (default task-3) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
23:03:28,633 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
23:03:28,634 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
23:03:28,634 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
23:03:28,634 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
23:03:28,634 ERROR [stderr] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
23:03:28,635 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
23:03:28,635 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
23:03:28,636 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
23:03:28,636 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
23:03:28,636 ERROR [stderr] (default task-3) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
23:03:28,636 ERROR [stderr] (default task-3) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
23:03:28,637 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
23:03:28,637 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction$$Lambda$887/252834873.call(Unknown Source)
23:03:28,638 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
23:03:28,639 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$888/1261718761.call(Unknown Source)
23:03:28,639 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
23:03:28,639 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$888/1261718761.call(Unknown Source)
23:03:28,640 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
23:03:28,640 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$888/1261718761.call(Unknown Source)
23:03:28,640 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
23:03:28,641 ERROR [stderr] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$888/1261718761.call(Unknown Source)
23:03:28,641 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
23:03:28,641 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
23:03:28,642 ERROR [stderr] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
23:03:28,642 ERROR [stderr] (default task-3) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
23:03:28,642 ERROR [stderr] (default task-3) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
23:03:28,642 ERROR [stderr] (default task-3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
23:03:28,643 ERROR [stderr] (default task-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
23:03:28,643 ERROR [stderr] (default task-3) at java.lang.Thread.run(Thread.java:745)
23:03:28,644 ERROR [stderr] (default task-3) Caused by: java.lang.NullPointerException
23:03:28,644 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3005)
23:03:28,644 ERROR [stderr] (default task-3) at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1916)
23:03:28,644 ERROR [stderr] (default task-3) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1845)
23:03:28,645 ERROR [stderr] (default task-3) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1215)
23:03:28,645 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255)
23:03:28,645 ERROR [stderr] (default task-3) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286)
23:03:28,645 ERROR [stderr] (default task-3) ... 111 more
在错误消息的底部,我得到一个提示,它是由空指针异常引起的,但我就是不知道什么可以在我的查询/代码中为空?一切都可以完美地与终端,只是不是与JDBC。
不幸的是,如果您的设备使用旧版本的Android ie.V6.以上都不行。jdbc驱动程序V8与旧版本的Android不兼容。
我正面临着同样的问题,我所做的是,我只是更新到mysql连接器-java-8.0.11
以前是mysql连接器-java-5.1.38
。
改变
Class.forName("com.mysql.jdbc.Driver");
到
Class.forName("com.mysql.cj.jdbc.Driver");
使用mysql-8.0.17.0
您的程序上有哪个版本的mysql connector java?我在我的电脑上运行了你的代码,没有问题。但是我将mysql connector java更改为版本5.1.26,我得到了相同的错误。您正在使用mysql 8.0.11,因此可以尝试使用mysql连接器java 8.0.11。
对了,URL
,你在8版应该这样写
String URL= "jdbc:mysql://127.0.0.1:3306/db_example?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=GMT";
获取以下代码的错误 我得到的输出错误是
我正在处理一个奇怪的问题,即使用JDBC在AmazonRDS上连接MySQL数据库。我有两部不同的Android手机在同一个网络上运行相同的代码。一个人连接起来没有任何问题。另一个是给我以下的例外: 数据库只显示1个活动连接,所以我知道这不是因为打开的连接太多。我尝试重新启动服务器,但没有帮助。我使用的是MySQL JDBC Connector/J版本5.1.23。工作的手机运行的是Android
我创建了一个简单的Spring启动应用程序,以使用相同的网络通过docker与MYSQL通信。一旦我运行命令,就会发生以下错误 雇员-jdbc-容器|java.sql.SQLNon瞬态连接异常:无法创建与数据库服务器的连接。尝试重新连接3次。放弃。 员工jdbc容器|由:com引起。mysql。cj。例外情况。UnableToConnectionException:不允许检索公钥 docker编写
问题内容: 我今天搬到了macOS,并重新创建了一个非常简单的数据库测试项目来检查mySQL连接。但是我收到一个SQL异常:“无法创建与数据库服务器的连接”。这是完整的日志: https //pastebin.com/iZrktVKn 我照搬了我在Windows上所做的每一步。在Windows上,一切都很好。我有一个context.xml,一个Servlet和一个connector.jar文件。该
Payara错误 连接池 资源 本地数据库 https://pastebin.com/QSKEL0Kd 我用mysql workbench在localhost上创建了一个数据库,用户:root,端口:3306,密码正确。当我输入localhost时,我也检查了两次,但没有工作
我的Solr 8.10.1 data importhandler indexer在尝试从MySQL5.7导入时抛出错误。 原因:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:无法创建到数据库服务器的连接。原因:java.lang.NullPointerException:无法调用“java.util.Map