Guest User

Untitled

a guest
Oct 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public class MainJava {
  2. private final String driverName = "com.mysql.jdbc.Driver";
  3. private static final String URL = "jdbc:mysql://localhost:3306/mydbtest";
  4. private static final String USER = "root";
  5. private static final String PASS = "root";
  6.  
  7. public static void main(String[] args) {
  8. Connection connection;
  9. try {
  10. connection = DriverManager.getConnection(URL, USER, PASS);
  11.  
  12. } catch (SQLException e) {
  13. e.printStackTrace();
  14. }
  15. } }
Add Comment
Please, Sign In to add comment