From d9705c08bae51795e407c5e58d021b073e8e8374 Mon Sep 17 00:00:00 2001 From: zyyang Date: Tue, 5 Jan 2021 15:12:08 +0800 Subject: [PATCH] change --- .../JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java b/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java index fc17b2c1c7..b5012c215f 100644 --- a/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java +++ b/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java @@ -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"); } -- GitLab