This commit is contained in:
zyyang 2021-01-05 15:12:08 +08:00
parent ec85a24cea
commit d9705c08ba
1 changed files with 2 additions and 2 deletions

View File

@ -40,10 +40,10 @@ public class JDBCDemo {
private void init() {
// get connection
try {
String url = "jdbc:TAOS://" + host + ":6030/";
String url = "jdbc:TAOS://" + host + ":6030/?user=root&password=taosdata";
if (driverType.equals("restful")) {
Class.forName("com.taosdata.jdbc.rs.RestfulDriver");
url = "jdbc:TAOS-RS://" + host + ":6041/";
url = "jdbc:TAOS-RS://" + host + ":6041/?user=root&password=taosdata";
} else {
Class.forName("com.taosdata.jdbc.TSDBDriver");
}