Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nkotb;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- public class Connect {
- String url = "jdbc:mysql://localhost:3306/nkotb";
- String user = "root";
- String password = "1337";
- Connection conn = null;
- public void Connection() {
- try {
- //1. Anslutning till mysql
- conn = DriverManager.getConnection(url, user, password);
- } catch (SQLException exc) {
- System.out.println(exc.getMessage());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement