Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. package msi;
  2.  
  3. import java.sql.*;
  4.  
  5. public class MSI {
  6.  
  7. public static void main(String[] args){
  8. Connection con = null;
  9.  
  10. String userName = "ak_user2";
  11. String pass = "wertyu";
  12. String url = "jdbc:mysql://212.182.24.236/ak_db2";
  13.  
  14. try {
  15. Class.forName ("com.mysql.jdbc.Driver");
  16. con=DriverManager.getConnection(url,userName,pass);
  17. System.out.println("Udalo sie");
  18. } catch (SQLException | ClassNotFoundException ex) {
  19. System.out.print(ex);
  20. }
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement