I am following along with the book "learn java for web development" by vishal layka at present. But I have run into an issue which I will describe as best I can here. Essentially I cant connect to my database called "book" with connectorj 5.0.8. the database is running locally on microsft sql server 2014.
this is the method iam using to get the connection.
private Connection getConnection() throws SQLException
return DriverManager.getConnection("jdbc:mysql://localhost:3306/books","eoin", "");
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
MESSAGE: Connection refused: connect
First of all your connection string is wrong.
Change it to