I have Java code that looks as follows and a MySQL database running on my machine.
System.out.println("Loading JDBC");
Class.forName("com.mysql.jdbc.Driver").newInstance();
System.out.println("JDBC loaded");
System.out.println("Establishing connection");
myConnection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:1186/dbname","username","password");
System.out.println("Connection established");
However, the output I get is the following:
Loading JDBC
JDBC loaded
Establishing connection
and then nothing? it doesn't report an error connecting, so it must be connected. What's going on? why isn't it moving to the next line of code?
I'd appreciate any help