Java:JDBC Driver URL 列表

SQLite-Driver = "org.sqlite.JDBC"

SQLite-URL = "jdbc:sqlite:G:/test.db"

 

PostgreSQL-Driver = "org.postgresql.Driver"

PostgreSQL-URL    = "jdbc:postgresql://localhost:5432/postgres"


MySQL连接:

MySQL-Driver = "com.mysql.jdbc.Driver"

MySQL-URL    = "jdbc:mysql://localhost/test"

MySQL-URL    = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8"

如果是在 XML 文件中需要将 & 符号改为 & 如下:

"jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8"

如果MySQL版本是5.7,可能还需要加上取消SSL参数:

jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false


Oracle-Driver = "oracle.jdbc.driver.OracleDriver"

Oracle-URL    = "jdbc:oracle:thin:@192.168.8.181:1521:tb"

 

Oracle-Driver = "oracle.jdbc.driver.OracleDriver"

Oracle-URL    = "jdbc:oracle:thin:@localhost:1521:tb"

 

DB2-Driver = "oracle.jdbc.driver.OracleDriver"

DB2-URL    = "jdbc:db2://192.168.1.229:50000/HBZY"


HSQL-Driver = "org.hsqldb.jdbcDriver"

HSQL-URL    = "jdbc:hsqldb:hsql://localhost"


微软SQLServer连接:

SQLServer-Driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver"

SQLServer_URL    = "jdbc:microsoft:sqlserver://localhost:1433;databasename=northwind"

 

SQLServer2005-Driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"

SQLServer2005_URL    = "jdbc:sqlserver://localhost:1433;databasename=northwind"


以jDTS驱动连接SQLServer

SQLServer-Driver = "net.sourceforge.jtds.jdbc.Driver"

SQLServer_URL    = "jdbc:jtds:sqlserver://192.168.229.128:1433;databaseName=master"