Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- try
- {
- Class.forName("com.mysql.jdbc.Driver");
- }
- catch (ClassNotFoundException e)
- {
- e.printStackTrace();
- return;
- }
- try
- {
- Connection connection = DriverManager.getConnection("jdbc:mysql://192.168.105.101:3306/world", "root", "1997");
- Statement statement = connection.createStatement();
- }
- catch(Exception e)
- {
- System.out.println("Connection Failed!");
- e.printStackTrace();
- return;
- }
- }
- }
Add Comment
Please, Sign In to add comment