Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sfgbot;
- import java.sql.Connection;
- import java.sql.DriverManager;
- public class DatabaseCon {
- public static void makeCon() {
- try {
- Connection conn;
- // *** Make connection with the database
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- String url = "jdbc:mysql://127.0.0.1:3306/sfgbot";
- conn = DriverManager.getConnection(url, "root", "AtserBV");
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
- }
Add Comment
Please, Sign In to add comment