三大数据库默认端口

时间:2021-12-14 03:57:48

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";