2

I'm running MAMP and WSO2 Carbon data service at the same time. What I'm trying to do is adding a new data source by connecting to mysql server. I have added the com.mysql.jdbc.Driver to lib folder.

Full error which I'm getting when trying to test the connection

Error establishing data source connection: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

enter image description here

3 Answers 3

5

In my case simply putting useSSL=false on end of connection string did the magic

jdbc:mysql://localhost:3306/USERS?useSSL=false

Sign up to request clarification or add additional context in comments.

Comments

0

This seems to be a problem with mysql server configuration. Please have a look at following threads.

Solving a "communications link failure" with JDBC and MySQL

Why I get this error 'Communications link failure The last packet sent...' when connecting to MySQL with Java (Netbeans)?

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure

1 Comment

It was the port. It should be 8889 instead of 3306. Thanks for the support anyway.
0

I tried this and it's working by my side:

jdbc:mysql://localhost:3306/wso2_test?useUnicode=true&characterEncoding=UTF-8 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.