Reputation: 407
I'm trying to create a sql connection to another server with the default jdbc drivers but the applications connects alwas to the localhost. I've tryed it on tow different machines.
Here is my code
DriverManager.getConnection("jdbc:mysql://yourname.xyz:3306/database?serverTimezone=UTC&useSSL=true", "user", "password");
Please help me :)
Regrads
Upvotes: 0
Views: 31
Reputation: 36
Verify your hostname, port, database name and so on and tell us if there's something wrong with it.
Upvotes: 1