![Forrest logo](/images/logo.png)
doctl-serverless:tldr:3c712
The doctl serverless connect
command is used to establish a secure WebSocket connection to a DigitalOcean Managed Databases cluster or a Managed Redis cluster. When you run this command, doctl
(the official DigitalOcean command-line interface) utilizes the serverless functionality to connect to the specified cluster using a WebSocket connection. This allows you to interactively run queries, execute commands, and receive real-time updates on the cluster. The doctl serverless connect
command requires authentication with your DigitalOcean account and the appropriate access and permissions to interact with the specified cluster. Here's an example of how you can use this command: bash doctl serverless connect postgresql cluster-name
Replace postgresql
with the appropriate database type (like mysql
, mssql
, or redis
), and cluster-name
with the actual name of your cluster. Once the connection is established, you can enter SQL queries or other commands, and receive results or updates directly in your terminal.