Get JDBC Connection Object
Class.forName(dirver);
Connection conn = DriverManager.getConnection(url, user, pasword);
Database Config Parameter
MYSQL :
dirver = com.mysql.jdbc.Driver
url = jdbc:mysql://localhost:3306/mystock
user = root
password = root
| | |
Oracle :
dirver = oracle.jdbc.driver.OracleDriver
url = jdbc:oracle:thin:@localhost:1521:orcl
user = root
password = root
Format:
- user: database login user.
- password: database login password.
- url: localhost is local PC IP address, 1521 is local PC port,orcl is database name.
NOTE:
JAR package download site:
<a>https://pan.baidu.com/s/1eS5KR6a</a>
Download Password: r929
QQ Chat:591107233