General-quiet Disable log messages (e.g. when new connections are established). WARNING: this option disables
ALL logging output (including connection errors), which will likely make debugging difficult. The
-quiet flag takes precedence over the -verbose flag.
-verbose
When explicitly set to false, disable log messages that are not errors nor first-time startup
messages (e.g. when new connections are established
or closed without errors).
-version
Print the version of the proxy and exit
Connection-credential_file
If provided, this json file will be used to retrieve Service Account credentials. You may set the
GOOGLE_APPLICATION_CREDENTIALS environment variable for the same effect.
-token When set, the proxy uses this Bearer token for authorization
-max_connections
If provided, the maximum number of connections to establish before refusing new connections.
Defaults to 0 (no limit)
-instances
To connect to a specific list of instances, set the instances parameter to a comma-separated list
of ully qualified instance connection strings (project:region:name). For example:
-instances=my-project:my-region:my-instance
For connectivity over TCP, you must specify a tcp port as part of the instance string. For
example, the following example opens a loopback TCP socket on port 3306, which will be proxied to
connect to the instance 'my-instance' in project 'my-project':
-instances=my-project:my-region:my-instance=tcp:3306
When connecting over TCP, the -instances parameter is required.
Supplying INSTANCES environment variable achieves the same effect. One can use that to keep k8s
manifest files constant across multiple environments. If the name has the suffix '=tcp:port', a
TCP server is opened on the specified port to proxy to that instance. Otherwise, one socket file
per instance is opened in dir. You may use INSTANCES environment variable for the same effect.
Using both will use value from flag. Not compatible with -fuse-instances_metadata
When running on GCE (Google Compute Engine) you can avoid the need to specify the list of
instances on the command line by using the Metadata server. This parameter specifies a path to a
metadata value which is then polled for a comma-separated list of fully qualified instances
(project:region:name) to connect to in the exactly the same way as the -instances parameter.
Updates to the metadata value will be observed and acted on by the Proxy. For example, to use the
instance metadata value named cloud-sql-instances you would provide instance/attributes/cloud-sql-instances.-check_region
If specified, the region portion of the connection string is required for Unix socket-based
connections.
-projects
To direct the proxy to open connections for each Cloud SQL Instance in the comma-separated list of
projects specified, set the projects parameter:
-projects=my-project
-refresh_config_throttle
If set, this flag specifies the amount of forced sleep between successive API calls in order to
protect client API quota. Minimum allowed value is 1s
-dir When using Unix sockets (the default for systems which support them), the Proxy places the sockets
representing database instances in the directory specified by the -dir parameter.
-fuse If your local environment has FUSE installed, you can specify the -fuse flag to avoid the
requirement to specify instances in advance. Mount a directory at dir using FUSE for accessing
instances. Note that the directory at dir must be empty before this program is started. With
FUSE, any attempts to open a Unix socket in the directory specified by -dir automatically creates
that socket and connects to the corresponding instance.
-fuse_tmp
Used as a temporary directory if -fuse is set. Note that files in this directory can be removed
automatically by this program.
Automaticinstancediscovery
If the Google Cloud SQL is installed on the local machine and no instance connection flags are specified,
the proxy connects to all instances in the gcloud tool's active project. Run 'gcloudconfiglistproject'
to display the active project.