I am trying to connected to a MySql database using
jdbc. I have set up the database that I am trying to connect to. I have some
Java code which is simply trying to connect to the database. However I get the following error and was hoping someone would be able to help me out with it.
java.sql.SQLException: Unable to connect to any hosts due to exception: java.net
.SocketException: Option unsupported by protocol: create
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1622)
at com.mysql.jdbc.Connection.<init>(Connection.java:491)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:346)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at DataSource.<init>(DataSource.java:33)
Any help is appreciated.
Thanks,
Aidan