java/jdbc
changeset 13 f0e6a4b18ab8
equal deleted inserted replaced
12:999aca5857e1 13:f0e6a4b18ab8
       
     1 http://www.petefreitag.com/articles/jdbc_urls
       
     2 
       
     3 Guide to JDBC Driver URL's - MySQL, PostgreSQL, SQL Server, etc
       
     4 
       
     5 MySQL (Connector/J)
       
     6 ===================
       
     7 
       
     8 Driver Class: com.mysql.jdbc.Driver
       
     9 
       
    10 Default Port: 3306
       
    11 
       
    12 JDBC URL
       
    13 
       
    14 jdbc:mysql://[host][,failoverhost...][:port]/[database]
       
    15 jdbc:mysql://[host][,failoverhost...][:port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
       
    16 
       
    17 
       
    18 PostgreSQL
       
    19 ==========
       
    20 
       
    21 Driver Class: org.postgresql.Driver
       
    22 
       
    23 Default Port: 5432
       
    24 
       
    25 JDBC URL
       
    26 
       
    27     jdbc:postgresql:database
       
    28     jdbc:postgresql://host/database
       
    29     jdbc:postgresql://host:port/database
       
    30     jdbc:postgresql://host:port/database?user=userName&password=pass
       
    31     jdbc:postgresql://host:port/database?charSet=LATIN1&compatible=7.2
       
    32 
       
    33 Microsoft SQL Server (jTDS Driver)
       
    34 ==================================
       
    35 
       
    36 Driver Class: net.sourceforge.jtds.jdbc.Driver
       
    37 
       
    38 Default Port: 1433
       
    39 
       
    40 JDBC URL
       
    41 
       
    42     jdbc:jtds:sqlserver://server[:port][/database][;property=value[;...]]
       
    43     jdbc:jtds:sybase://server[:port][/database][;property=value[;...]]
       
    44     jdbc:jtds:sqlserver://server/db;user=userName;password=password
       
    45 
       
    46 List of URL properties
       
    47 
       
    48 Microsoft SQL Server (Microsoft Driver)
       
    49 =======================================
       
    50 
       
    51 Driver Class: com.microsoft.jdbc.sqlserver.SQLServerDriver
       
    52 
       
    53 Default Port: 1433
       
    54 
       
    55 JDBC URL
       
    56 
       
    57     jdbc:microsoft:sqlserver://host:port;databasename=name;user=yourUser;password=yourPwd
       
    58