localhost:1433

Port 1433 is Microsoft SQL Server — the enterprise database behind countless .NET applications, SharePoint, and Windows-based systems. If you're in the Microsoft ecosystem, you'll connect here.

Connect to SQL Server

SQLCMD

# Windows Authentication
sqlcmd -S localhost

# SQL Authentication
sqlcmd -S localhost -U sa -P YourPassword

# Specify port explicitly
sqlcmd -S localhost,1433 -U sa -P YourPassword

Connection Strings

# .NET
Server=localhost,1433;Database=mydb;User Id=sa;Password=pass;

# Node.js (mssql)
const config = {
  server: 'localhost',
  port: 1433,
  user: 'sa',
  password: 'password',
  database: 'mydb'
};

# Python (pyodbc)
conn = pyodbc.connect(
  'DRIVER={ODBC Driver 17 for SQL Server};'
  'SERVER=localhost,1433;'
  'DATABASE=mydb;'
  'UID=sa;PWD=password'
)

Check SQL Server Status

# Windows Services
# Check "SQL Server (MSSQLSERVER)" service

# Command line
sc query MSSQLSERVER

# PowerShell
Get-Service MSSQLSERVER

Common Errors

ErrorSolution
Cannot connectEnable TCP/IP in SQL Server Config Manager
Login failedEnable SQL Server Authentication mode
Port blockedAdd firewall rule for port 1433

Enable TCP/IP

  1. Open SQL Server Configuration Manager
  2. SQL Server Network Configuration → Protocols
  3. Enable TCP/IP
  4. Set TCP Port to 1433
  5. Restart SQL Server service

Docker SQL Server

docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourPass123!" \
  -p 1433:1433 \
  mcr.microsoft.com/mssql/server:2022-latest

Related Ports

PortDatabase
3306MySQL
5432PostgreSQL
1434SQL Server Browser