Forrest logo
back to the doctl tool

doctl-serverless:tldr:3c712

doctl-serverless: Connect local serverless support to a functions namespace.
$ doctl serverless connect
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the doctl tool