created - 07/2021         Edited - 08/2023

How to Connect to Your SQL Database Using the SQL Port Number

Rina Nahar

Many Databases - Single Tool for Database Developers, DBAs, & DevOps

If you want to connect to your SQL database using the SQL port number, there are a few things you need to know. In this blog post, we will explain what the SQL port number is and how to connect to your SQL database using the hostname and port number.

SQL Server default port is 1433. If you want to change the port number, you can do so by going to SQL Server Configuration Manager. In the left-hand pane, expand SQL Server Network Configuration and then select Protocols for SQLEXPRESS. In the right-hand pane, double-click TCP/IP.

Many times SQL Server database is not running on the default port 1433. In this situation connecting with DBHawk is straight forward.

You can enter the different port on port number field. e.g. with following screenshot, enter host name and the port number.

SQL Port Non Default Port connection

Connect to a different port with DBHawk

If you need to connect to the non default port with SQL Server database, you need to use the syntax "serverName,portNumber" when connecting. For example, if your server name is "MyServer" and the port number is "1234", you would use the following connection string:

server=MyServer,1234;database=myDatabase;integrated security=true;

When connecting with Microsoft SQL Server Management studio, enter port number with comma.

SQL Port non default connection with SQL Server Management Studio

Connect to a different port with SQL Server Management Studio

Here in Server name field, entered host IP address and port number separated with comma.

Find out more about Microsoft SQL Server data tools at MSSQL Client

What are the default database ports

The default database ports are the ports that are used by a database server to listen for connections from clients. The default ports for some of the most popular databases are:


You may also like

Many Databases, Single Tool, No Client Software

Get started for free.

Sign Up to see how DBHawk provides zero trust database access and development across all databases.

No Credit card required!