1.Oracle数据库的默认端口:1521
Url:"jdbc:oracle:thin:@localhost :1521:orcl";
DriverName:"oracle.jdbc.driver.OracleDriver";
2.MySQL数据库的默认端口:3306
Url:jdbc:mysql://localhost:3306/test? user=root&password=xxxxx; (MySQL5系列)
DriverName:"com.mysql.jdbc.Driver";
Url:jdbc:mysql://localhost:3306/test? user=root&password=xxxxx&serverTimezone=UTC&characterEncoding=utf-8&useSSL=false; (MySQL8系列)
DriverName:"com.mysql.cj.jdbc.Driver";
3.sqlserver数据库的默认端口号为:1433
URL:"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=dbname";
DriverName:"com.microsoft.jdbc.sqlserver.SQLServerDriver";
原文地址:https://www.cnblogs.com/abcdjava/p/11689468.html
时间: 2024-10-11 21:45:27