created - 07/2021 Edited - 08/2024
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 tcp port number is and how to connect to your SQL database using the hostname and port number.
Default SQL Server 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.
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.
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 atMSSQL 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:
- MySQL: 3306 (protocol tcp udp)
- DB2: 50000
- Oracle: 1521
- 1521 TCP - Oracle SQL Net Listener and Data Guard
- 1832 TCP - Oracle Enterprise Management Agent HTTP
- PostgreSQL: 5432 (protocol tcp udp)
- Redshift: 5439
- Microsoft SQL Server: 1433
- Port 1434 is used for SQL Server Browser service
- MongoDB: 27017
- 27018 The default port for mongod when running with --shardsvr
- 27019 The default port for mongod when running with --configsvr command-line option
- 27020 The default port from which mongocryptd listens for messages
- Teradata: 1025
- Cassandra: 9042
- 7000 for cluster communication
- 7001 for SSL cluster communication
- Exasol: 8563 Exasol database client connection port
- Greenplum: 5432 Default database port for Greenplum database
- Netezza: 5480 Default database port for Netezza database connection
- SAP Hana: 30015 Default database port for SAP HANA database connection
- Vertica: 5433 Default Vertica database port for client connection
Tags