gcloud_alpha_sql_connect (1)
NAME
- gcloud alpha sql connect - connects to a Cloud SQL instance
SYNOPSIS
-
gcloud alpha sql connect INSTANCE [--database=DATABASE, -d DATABASE] [--port=PORT; default=9470] [--user=USER, -u USER] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Connects to Cloud SQL V2 instances through the Cloud SQL Proxy.
POSITIONAL ARGUMENTS
-
- INSTANCE
-
Cloud SQL instance ID.
FLAGS
-
- --database=DATABASE, -d DATABASE
-
The PostgreSQL database to connect to.
- --port=PORT; default=9470
-
Port number that gcloud will use to connect to the Cloud SQL Proxy through
localhost.
- --user=USER, -u USER
-
Cloud SQL instance user to connect as.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To connect to a Cloud SQL instance, run:
- $ gcloud alpha sql connect my-instance --user=root
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud sql connect $ gcloud beta sql connect