File: //snap/google-cloud-cli/current/help/man/man1/gcloud_beta_sql_connect.1
.TH "GCLOUD_BETA_SQL_CONNECT" 1
.SH "NAME"
.HP
gcloud beta sql connect \- connects to a Cloud SQL instance
.SH "SYNOPSIS"
.HP
\f5gcloud beta sql connect\fR \fIINSTANCE\fR [\fB\-\-database\fR=\fIDATABASE\fR,\ \fB\-d\fR\ \fIDATABASE\fR] [\fB\-\-port\fR=\fIPORT\fR;\ default=9470] [\fB\-\-user\fR=\fIUSER\fR,\ \fB\-u\fR\ \fIUSER\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR Connects to a Cloud SQL instance.
.SH "EXAMPLES"
To connect to a Cloud SQL instance, run:
.RS 2m
$ gcloud beta sql connect my\-instance \-\-user=root
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIINSTANCE\fR
Cloud SQL instance ID.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-database\fR=\fIDATABASE\fR, \fB\-d\fR \fIDATABASE\fR
The PostgreSQL or SQL Server database to connect to.
.TP 2m
\fB\-\-port\fR=\fIPORT\fR; default=9470
Port number that gcloud will use to connect to the Cloud SQL Proxy through
localhost.
.TP 2m
\fB\-\-user\fR=\fIUSER\fR, \fB\-u\fR \fIUSER\fR
Cloud SQL instance user to connect as.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud sql connect
.RE
.RS 2m
$ gcloud alpha sql connect
.RE