240102 HTML DBConnection.java

2024. 1. 4. 16:072023.11.21-2024.05.31

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.sukgi.db;
 
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
 
public class DBConnection {
    public Connection getConn() {
        Connection conn = null;
        
        try {
            Class.forName("org.mariadb.jdbc.Driver");
            String url = "jdbc:mariadb://guro.wisejia.com:3308/c23c_22";
            conn = DriverManager.getConnection(url, "c23c_22""01234567");
        } catch (ClassNotFoundException e) {            
            e.printStackTrace();
            
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return conn;
        
    }
}
 
cs

'2023.11.21-2024.05.31' 카테고리의 다른 글

240102 HTML Study.java  (1) 2024.01.04
240102 HTML Delete.java  (1) 2024.01.04
240102 HTML BoardDAO.java  (0) 2024.01.03
240102 HTML write.css  (0) 2024.01.03
240102 HTML write.js  (0) 2024.01.03