Skip to content

Connect to local SQL Server from Mac

Use the SQL Server host’s TCP address and a SQL login to connect from your Mac. This guide covers an existing server; for a container, use the Docker guide.

Have the server running and a database account ready. Ask the server owner for:

  • The DNS hostname and TCP port.
  • The database name.
  • Your SQL user and password.
  • The certificate authority, if the server uses a private CA.
  • Any VPN or SSH access requirements.

Use 127.0.0.1 only when SQL Server is reachable on your Mac’s loopback address. For another computer, use that computer’s hostname.

The usual SQL Server port is 1433. Confirm the configured TCP port, especially for a named instance. Enter the hostname and port in separate fields.

The server must accept SQL authentication and TCP connections from your Mac. For a managed company server, ask its administrator to confirm these settings.

  1. Choose File › New Connection….
  2. Select SQL Server as the Driver.
  3. Enter a connection Name.
  4. Fill in Host, Port and Database with the server details.
  5. Enter your SQL User and Password.
  6. Set SSL Mode using the certificate settings below.
  7. Click Test.
  8. Click Save & Connect after a successful test.

For password storage choices and other form options, see connection basics.

SQL Server connection form with host, port, database, SQL login and Verify Full selected

Verify Full is the SQL Server default. Use the DNS hostname on the server certificate.

SSL Mode Certificate verification
Verify Full Checks the certificate chain and hostname.
Verify CA Checks the certificate chain.

For a private CA, select its certificate under Root CA with Select File…. For server-required client authentication, select both Client Cert and Client Key. See SSL/TLS settings for the file controls.

An SSH tunnel provides a route through another server. Enter the database address that the SSH server can reach, and configure database TLS separately.

Use Import from URL with a URL in this form:

sqlserver://docs_user@sql.example.test:1433/docs_bookstore?sslmode=verify-full

Replace the example host, user and database. Enter the password in the form, then check the imported fields before Test. The mssql:// scheme is also accepted.

Error or symptom Check
connection refused Server service, TCP listener, configured port and host firewall.
Timeout or No route to host Network route, VPN and macOS Local Network permission.
Login failed for user SQL Server error 18456.
Certificate validation failure Hostname, CA and TLS repair.

For other errors, use connection failed.

Return to the SQL Server overview or continue with browse and search.