Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ztestconnection;
- import java.sql.*;
- public class Test {
- static String Username = "Klongrich";
- static String Password = "cash7144";
- static String Connection = "jdbc:mysql://localhost:8080/hospital";
- public static void main(String [] args){
- Connection con = null;
- try{
- con = DriverManager.getConnection(Connection, Username, Password);
- System.out.println("Connected");
- } catch(Exception e){
- System.out.println(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement