- 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 a Cloud SQL instance. - EXAMPLES
-
To connect to a Cloud SQL instance, run:
gcloud alpha sql connect my-instance --user=root
- POSITIONAL ARGUMENTS
-
INSTANCE
- Cloud SQL instance ID.
- FLAGS
-
--database
=DATABASE
,-d
DATABASE
- The PostgreSQL or SQL Server 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:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
-
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation-only early access
allowlist. These variants are also available:
gcloud sql connect
gcloud beta sql connect
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.