Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static final String USERNAME = "root";
- private static final String PASSWORD = "password";
- private static final String CONN_STRING = "jdbc:mysql://local:3306/test";
- public static void main(String[] args) {
- Connection conn = null;
- try {
- conn = DriverManager.getConnection(CONN_STRING,USERNAME,PASSWORD);
- System.out.println("Connected");
- }catch (SQLException e){
- System.err.println(e);
- }
- }
Add Comment
Please, Sign In to add comment