![]() ![]() Set ‘socketFactory’ to ‘.AFUNIXDatabaseSocketFactory’Īnd add ‘junixsocket.file’ with the path to our unix socket. Under ‘Driver Files’, click the + button and select:Īdd a new MySQL datasource, and under ‘Advanced’: In DataGrip’s Data Sources and Drivers Window, select the MySQL driver. The latest at time of writing (2.3.1) did work.Įxtract junixsocket somewhere (doesn’t matter, just needs to be accessible to DataGrip.) ![]() ![]() The Ubuntu package is currently 2.04, and did not work for me. It mentions DataGrip, but that’s part of the IntelliJ family, so maybe this will work for PHPStorm as well?ĭownload an up-to-date version of junixsocket Maybe you can use that code? I found that project by reading through the steps from this comment in PHPStorm’s Support site. This is because sockets are more performant, but Windows doesn’t support unix sockets.įor those of you using Mac – it looks like there is this project to bring Unix sockets to Java: Macs use sockets, while Windows uses ports. The way to connect to the DB depends on the OS that you are using. The driver has not received any packets from the server.Īt .createCommunicationsException(SQLError.java:1036)Īt .(MysqlIO.java:338)Īt .coreConnect(ConnectionImpl.java:2232)Īt .connectWithRetries(ConnectionImpl.java:2085)Ĭaused by: : Operation timed outĪt (Native Method)Īt (AbstractPlainSocketImpl.java:350)Īt (AbstractPlainSocketImpl.java:206)Īt (AbstractPlainSocketImpl.java:188)Īt (SocksSocketImpl.java:392)Īt (Socket.java:589)Īt .connect(StandardSocketFactory.Hey everyone, sorry for the confusion with this. The last packet sent successfully to the server was 0 milliseconds ago. Giving up.Īt 0(Native Method)Īt (NativeConstructorAccessorImpl.java:62)Īt (DelegatingConstructorAccessorImpl.java:45)Īt .newInstance(Constructor.java:422)Īt .handleNewInstance(Util.java:377)Īt .getInstance(Util.java:360)Īt .createSQLException(SQLError.java:956)Īt .createSQLException(SQLError.java:935)Īt .createSQLException(SQLError.java:924)Īt .createSQLException(SQLError.java:870)Īt .connectWithRetries(ConnectionImpl.java:2144)Īt .createNewIO(ConnectionImpl.java:2069)Īt .(ConnectionImpl.java:790)Īt 4Connection.(JDBC4Connection.java:44)Īt .getInstance(ConnectionImpl.java:395)Īt .connect(NonRegisteringDriver.java:325)Īt .(RemoteDriverImpl.java:27)Īt 0(Native Method)Īt (NativeMethodAccessorImpl.java:62)Īt (DelegatingMethodAccessorImpl.java:43)Īt .invoke(Method.java:497)Īt .dispatch(UnicastServerRef.java:323)Īt $1.run(Transport.java:200)Īt $1.run(Transport.java:197)Īt (Native Method)Īt .serviceCall(Transport.java:196)Īt .TCPTransport.handleMessages(TCPTransport.java:568)Īt .TCPTransport$n0(TCPTransport.java:826)Īt .TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)Īt .TCPTransport$n(TCPTransport.java:682)Īt .runWorker(ThreadPoolExecutor.java:1142)Īt $n(ThreadPoolExecutor.java:617)Īt .exceptionReceivedFromServer(StreamRemoteCall.java:276)Īt .executeCall(StreamRemoteCall.java:253)Īt .invoke(UnicastRef.java:162)Īt .invokeRemoteMethod(RemoteObjectInvocationHandler.java:217)Īt .invoke(RemoteObjectInvocationHandler.java:171)Īt .$nnect(Unknown Source)Īt .RemoteUtil.invokeRemote(RemoteUtil.java:124)Īt .RemoteUtil.access$100(RemoteUtil.java:36)Īt .RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:229)Īt .$nnect(Unknown Source)Īt .LocalDataSource.getConnection(LocalDataSource.java:296)Īt .LocalDataSource.getConnection(LocalDataSource.java:264)Īt .AbstractDataSource.performJdbcOperation(AbstractDataSource.java:111)Īt .AbstractDataSource.refreshMetaData(AbstractDataSource.java:34)Īt .DataSourceUiUtil$4.run(DataSourceUiUtil.java:218)Īt .impl.CoreProgressManager$n(CoreProgressManager.java:563)Īt .impl.CoreProgressManager$8.run(CoreProgressManager.java:357)Īt .impl.CoreProgressManager$2.run(CoreProgressManager.java:142)Īt .(CoreProgressManager.java:446)Īt .(CoreProgressManager.java:392)Īt .(ProgressManagerImpl.java:54)Īt .(CoreProgressManager.java:127)Īt .impl.ApplicationImpl$14$1.run(ApplicationImpl.java:634)Īt .impl.ApplicationImpl$8.run(ApplicationImpl.java:366)Īt $RunnableAdapter.call(Executors.java:511)Īt .run(FutureTask.java:266)Īt $1$1.run(PooledThreadExecutor.java:55)Ĭaused by: : Communications link failure ![]() : Could not create connection to database server. 14:53:31,715 WARN - Could not create connection to database server. Below is a snippet from the log but that does not give me much to go on. Also, that it attempted to connect 3 times and was giving up. But, when I try to connect using the data sources and drivers window I get an error stating that it could not create a connection to the database server. I know my database is up and running and I can connect to it without issue from my PC using any number of python scripts that i have authored as well as from the command line (using mysql tools) and using other db tools like Querious. I am using the latest version of IJ and attempting to connect to my database using IJ. ![]()
0 Comments
Leave a Reply. |