Home > Database > Mysql Tutorial > 数据库链接

数据库链接

WBOY
Release: 2016-06-07 15:47:45
Original
1132 people have browsed it

项目做的多了,连最基本的链接数据库的方式都忘记了。今天记录以便以后查看 oracle/mysql Class.forName(oracle.jdbc.driver.OracleDriver/com.mysql.jdbc.Driver); Connection connoracl = DriverManager.getConnection(jdbc:oracle:thin:@192.168.1.252:15

项目做的多了,连最基本的链接数据库的方式都忘记了。今天记录以便以后查看

oracle/mysql

Class.forName("oracle.jdbc.driver.OracleDriver"/com.mysql.jdbc.Driver);
                  Connection connoracl = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.252:1521:orcl"/jdbc:mysql://192.168.1.252:3306/ecmsdb?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, "username", "password");

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template