From e79e8f895ea2dd09ce23ee3e202456770743b1a5 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 28 Dec 2021 17:43:21 +0800 Subject: [PATCH] 1 --- src/main/java/com/fr/demo/NewReadFrmFromDatabase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fr/demo/NewReadFrmFromDatabase.java b/src/main/java/com/fr/demo/NewReadFrmFromDatabase.java index 8350a6b..0895cc7 100644 --- a/src/main/java/com/fr/demo/NewReadFrmFromDatabase.java +++ b/src/main/java/com/fr/demo/NewReadFrmFromDatabase.java @@ -56,9 +56,9 @@ public class NewReadFrmFromDatabase extends DBFormlet { private static Connection getConnection() throws ClassNotFoundException, SQLException { // 定义数据连接(根据你实际数据库信息进行修改) String driver = "com.mysql.jdbc.Driver"; - String url = "jdbc:mysql://localhost:3306/frtest"; + String url = "jdbc:mysql://localhost:3306/test"; String user = "root"; - String pass = "root"; + String pass = "123456"; Class.forName(driver); Connection conn = DriverManager.getConnection(url, user, pass); return conn;