String connectionUrl = "jdbc:sqlserver://localhost;databaseName=MyDB;integratedSecurity=true;";
Connection conn = DriverManager.getConnection(connectionUrl);
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
因为我用的是 SQL Server Express 版本，所以不知道如何配置端口。请教解决过这个问题的高手。