localhost:1433 — Microsoft SQL Server
SQL Server is the database that powers most of the enterprise Windows world — ASP.NET apps, corporate intranets, ERP systems, business intelligence. For a long time it was Windows-only, which kept it out of the startup/indie developer ecosystem. But since Microsoft released SQL Server on Linux in 2017 and made it available as a Docker image, it's become practical to run it anywhere — including on your Mac or Linux dev machine, which was previously unthinkable.
Port 1433 is the default TCP port for the SQL Server Database Engine. Named instances can use dynamic ports, but the default instance always starts on 1433 unless someone changed it.
The Fastest Way to Get SQL Server Running
If you don't already have SQL Server installed and just need a local instance for development, Docker is by far the easiest path:
# Pull and run SQL Server 2022 Developer Edition (free for dev use)
docker run -d --name sqlserver \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=YourStrong!Pass123" \
-p 1433:1433 \
mcr.microsoft.com/mssql/server:2022-latest
# Verify it's running
docker logs sqlserver
That gives you a fully functional SQL Server instance in about 30 seconds. The SA (System Administrator) account is the superuser. The password must meet SQL Server's complexity requirements: at least 8 characters, with uppercase, lowercase, and a number or symbol.
Connecting to SQL Server
SQL Server Management Studio (SSMS)
The traditional Windows-only GUI. Connect with:
- Server name:
localhost(orlocalhost,1433if using a non-default port) - Authentication: SQL Server Authentication
- Login:
sa - Password: whatever you set
Azure Data Studio
Microsoft's modern, cross-platform alternative to SSMS. Works on Windows, Mac, and Linux. Lighter than SSMS, supports notebooks, and has a VS Code-style interface. Same connection details as SSMS.
Command Line (sqlcmd)
# Connect locally
sqlcmd -S localhost -U sa -P "YourStrong!Pass123"
# Run a quick query
sqlcmd -S localhost -U sa -P "YourPass" -Q "SELECT @@VERSION"
# Inside the Docker container
docker exec -it sqlserver /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P "YourStrong!Pass123" -C
Connection Strings by Language
# .NET (C#) — the native SQL Server language
"Server=localhost,1433;Database=MyApp;User Id=sa;Password=YourPass;TrustServerCertificate=True;"
# Node.js (mssql package)
const config = {
server: 'localhost',
port: 1433,
user: 'sa',
password: 'YourPass',
database: 'MyApp',
options: { trustServerCertificate: true }
};
# Python (pyodbc)
conn_str = (
"DRIVER={ODBC Driver 18 for SQL Server};"
"SERVER=localhost,1433;"
"DATABASE=MyApp;"
"UID=sa;PWD=YourPass;"
"TrustServerCertificate=yes;"
)
# PHP (PDO)
$pdo = new PDO(
"sqlsrv:Server=localhost,1433;Database=MyApp",
"sa", "YourPass"
);
# Java (JDBC)
jdbc:sqlserver://localhost:1433;databaseName=MyApp;user=sa;password=YourPass;trustServerCertificate=true
Notice the TrustServerCertificate=True everywhere — SQL Server 2022 and newer enforce encrypted connections by default. In development against localhost, you need to trust the self-signed certificate or connections fail with cryptic TLS errors.
SQL Server vs. MySQL vs. PostgreSQL
Quick comparison for developers choosing a database:
| Feature | SQL Server (1433) | MySQL (3306) | PostgreSQL (5432) |
|---|---|---|---|
| Ecosystem | .NET / C# / Enterprise | PHP / WordPress / LAMP | Full-stack / Analytics |
| Free tier | Express (10 GB limit) | Community (no limits) | Full (no limits) |
| Cross-platform | Yes (since 2017) | Yes (always) | Yes (always) |
| JSON support | Good | Good | Excellent (JSONB) |
| Best at | BI, stored procedures | Simple web apps | Complex queries, extensions |
Troubleshooting Connection Issues
"Cannot connect to localhost,1433": SQL Server might not be running, or it might be on a different port. On Windows, open SQL Server Configuration Manager and check "SQL Server Network Configuration" → "Protocols for [your instance]" → "TCP/IP" properties to see the actual port. Named instances often use dynamic ports instead of 1433.
Docker container exits immediately: Check logs with docker logs sqlserver. The most common cause is a weak SA password — SQL Server enforces complexity requirements and won't start if the password is too simple.
"Login failed for user 'sa'": SA account might be disabled (common on Windows installs that used Windows Authentication). Enable it in SSMS under Security → Logins → sa → Status → Login: Enabled. Also ensure "SQL Server and Windows Authentication mode" is selected in server properties.