Skip to content

Connect to Azure SQL Database from Mac

Use the Azure SQL Database server hostname, target database and a SQL user with access to that database.

Have your database provisioned and its SQL credentials ready. Your Mac needs a network route to its public or private endpoint.

This guide covers Azure SQL Database. For SQL Server running on an Azure virtual machine, use the server connection guide.

Open the database in the Azure portal. Its Overview shows the server name; copy the full hostname and the database name. Microsoft documents these fields in Get server connection information.

For the standard Azure public cloud endpoint, the hostname has this form:

your-server.database.windows.net

Use port 1433. Enter the SQL user supplied for the database, rather than your Azure portal sign-in.

For public access, allow your Mac’s outbound public IP through the database’s IP firewall rules. If you use a VPN, check the IP Azure sees after the VPN connects.

For private access, connect your Mac to the required network and use its DNS configuration. Keep the normal server hostname; Microsoft’s Private Link guidance requires it even for private endpoints.

  1. Open a new connection and select SQL Server.
  2. Enter the full server hostname as Host.
  3. Set Port to 1433.
  4. Enter the target Database.
  5. Enter your SQL User and Password.
  6. Keep SSL Mode set to Verify Full.
  7. Click Test.
  8. Click Save & Connect after a successful test.
SQL Server connection form for Azure SQL Database with the full server hostname, target database and Verify Full

For URL import, use the SQL Server URL format with your Azure hostname and database.

Azure SQL Database requires encryption. Verify Full also verifies the server identity, using the hostname and certificate chain. See Microsoft’s TLS connection guidance.

Use an SSH tunnel when your network provides access through an SSH server. That server needs a route to the database; TLS remains a separate connection setting.

Error or symptom Check
Client IP is not allowed Current outbound public IP and Azure firewall rules.
Timeout Public access settings, private network route, VPN and DNS.
Login failed for user SQL credentials and target database; follow error 18456.
Certificate validation failure Full server hostname and TLS repair.

For other failures, use connection failed.

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