Meta tags:
Headings (most frequently used words):
cloud, the, sql, auth, proxy, sockets, with, connect, tcp, unix, credentials, using, linux, bit, windows, use, an, for, service, to, and, 64, macos, docker, account, supplied, by, mysql, client, 32, python, java, node, js, go, ruby, php, create, private, instances, run, in, gcloud, rest, connecting, environment, curl, or, shell, powershell, stay, organized, collections, save, categorize, content, based, on, your, preferences, overview, before, you, begin, download, start, application, additional, topics, tips, working, troubleshoot, connections, what, next, mac, m1, image, other, os, command, line, arguments, options, authenticating, ip, write, endpoint, that, have, enabled, required, configurations, later, database, user, separate, process, container, running, as, enforce, of, v1, v1beta4, invoke, multiple, products, pricing, support, resources, engage, file, flag, access, token, variable, from, authenticated, cli, associated, compute, engine, instance, default,
Text of the page (most frequently used words):
the (582), cloud (412), sql (372), proxy (226), auth (184), for (148), and (139), you (131), instance (120), using (107), connect (94), use (91), mysql (76), #service (73), with (70), #database (66), account (66), your (63), can (59), instances (51), from (50), com (50), google (47), unix (45), credentials (45), that (43), see (42), following (41), environment (40), private (40), engine (39), more (38), user (38), connection (38), not (38), project (38), this (37), file (37), https (37), are (36), application (36), command (35), gcloud (35), password (35), cloudsql (34), secure (34), about (33), sockets (33), json (33), socket (32), create (31), note (30), instance_connection_name (29), tcp (29), manage (28), access (28), db_name (28), db_pass (28), db_user (28), secret (28), manager (28), key (25), when (24), server (24), running (24), public (24), overview (24), github (23), port (23), help (23), client (22), string (22), config (22), new (21), but (21), have (21), docker (21), start (21), configure (21), set (21), import (21), error (20), googleapis (20), view (20), getenv (20), system (19), example (19), request (19), data (19), connectors (19), connections (18), must (18), make (18), keep (18), such (18), env (18), pool (18), app (17), compute (17), iam (16), name (16), 127 (16), process (16), username (16), return (16), static (16), information (15), options (15), solution (15), 3306 (15), has (15), specify (15), then (15), run (15), path (15), jdbc (15), readme (15), secrets (15), enable (14), roles (14), linux (14), url (14), authentication (14), safe (14), consider (14), saving (14), variables (14), convenient (14), snippet (14), context (14), web (14), page (13), check (13), host (13), machine (13), windows (13), path_to_key_file (13), container (13), dbname (13), download (13), external (13), connecting (12), sqladmin (12), output (12), shell (12), image (12), projects (12), line (12), instance_unix_socket (12), storage (12), quickstart (12), upgrade (12), admin (11), configuration (11), here (11), local (11), cli (11), language (11), additional (11), mustgetenv (11), instance_host (11), db_port (11), other (10), java (10), learn (10), users (10), quota (10), region (10), console (10), default (10), sure (10), directory (10), how (10), version (10), curl (10), which (10), read (10), address (10), click (10), final (10), its (9), databases (9), management (9), connector (9), logs (9), operation (9), one (9), permission (9), myproject (9), token (9), required (9), applications (9), environ (9), high (9), code (8), support (8), creating (8), api (8), was (8), each (8), role (8), also (8), permissions (8), provide (8), log (8), invoke (8), select (8), replicas (8), option (8), below (8), flag (8), pdo (8), sprintf (8), properties (8), open (8), getenvironmentvariable (8), encryption (8), sqlalchemy (8), availability (8), samples (7), thumb (7), need (7), content (7), policies (7), queries (7), issues (7), created (7), authenticate (7), myinstance (7), enforcement (7), patch (7), save (7), settings (7), gcr (7), get (7), dns (7), ssl (7), write (7), endpoint (7), recovery (7), tls (7), monitor (7), tools (7), usage (7), vector (7), managed (7), started (6), resources (6), either (6), project_id (6), instance_name (6), multiple (6), list (6), include (6), between (6), disable (6), update (6), v1beta4 (6), headers (6), method (6), object (6), body (6), currently (6), enabled (6), only (6), separate (6), true (6), some (6), runtimeexception (6), class (6), nil (6), dbpool (6), err (6), fmt (6), initializes (6), connectionstring (6), equivalent (6), const (6), factory (6), hikariconfig (6), backups (6), performance (6), export (6), replication (6), community (5), problem (5), down (5), control (5), accounts (5), restart (5), uses (5), provided (5), different (5), format (5), terminal (5), find (5), available (5), 1234 (5), central1 (5), length (5), usually (5), background (5), connectorenforcement (5), authorization (5), execute (5), active (5), login (5), macos (5), before (5), any (5), development (5), place (5), supported (5), install (5), exe (5), without (5), adddatasourceproperty (5), setting (5), authorized (5), disaster (5), both (5), add (5), organization (5), describe (5), pooling (5), will (5), socketfactory (5), query (5), chmod (5), standard (5), services (5), bit (5), certificates (5), embeddings (5), choose (5), português (4), español (4), getting (4), status (4), all (4), understand (4), send (4), two (4), what (4), appears (4), limit (4), per (4), connects (4), operations (4), configured (4), value (4), editor (4), pull (4), troubleshoot (4), myinstance2 (4), specified (4), depends (4), 108 (4), capture (4), instead (4), does (4), cred (4), print (4), bearer (4), charset (4), utf (4), expand (4), named (4), assumes (4), logged (4), init (4), automatically (4), these (4), production (4), used (4), documentation (4), parameter (4), registry (4), cloudsqlproxy (4), security (4), recommended (4), domain (4), provides (4), same (4), vpc (4), owner (4), associated (4), authenticating (4), variable (4), conn (4), getcode (4), getmessage (4), assistance (4), throw (4), catch (4), pdoexception (4), php (4), typeerror (4), dsn (4), namespace (4), fetch (4), dburi (4), dbpwd (4), dbuser (4), var (4), func (4), mysqlconnectionstringbuilder (4), hikaridatasource (4), link (4), datasource (4), zaxxer (4), hikari (4), pymysql (4), invocation (4), 172 (4), gae (4), flex (4), flexible (4), through (4), plugin (4), sdk (4), executable (4), kubernetes (4), migration (4), reconfigure (4), optimize (4), build (4), best (4), practices (4), custom (4), major (4), maintenance (4), free (4), terms (3), architecture (3), missing (3), except (3), under (3), identify (3), source (3), listening (3), ready (3), confirm (3), including (3), 403 (3), always (3), correct (3), determine (3), try (3), based (3), unique (3), listen (3), argument (3), strings (3), however (3), prompt (3), avoid (3), programs (3), trigger (3), not_required (3), should (3), similar (3), powershell (3), type (3), enforces (3), doesn (3), built (3), nssm (3), programming (3), shown (3), works (3), cannot (3), dbport (3), setjdbcurl (3), record (3), networks (3), network (3), location (3), keys (3), enter (3), contains (3), authenticated (3), supplied (3), depending (3), examples (3), arguments (3), instanceunixsocket (3), unix_socket (3), unixsocketpath (3), package (3), require (3), initialize (3), perform (3), googlecloudplatform (3), instancehost (3), deployed (3), db_host (3), troubleshooting (3), caching_sha2_password (3), outside (3), myregion (3), sudo (3), found (3), images (3), guides (3), observability (3), analytics (3), capacity (3), tables (3), reduce (3), table (3), prevent (3), backup (3), auditing (3), indexes (3), insights (3), mcp (3), audit (3), search (3), model (3), reference (3), files (3), restore (3), migrate (3), customer (3), tags (3), trial (3), product (3), 한국어 (2), 日本語 (2), עברית (2), brasil (2), italiano (2), indonesia (2), français (2), américa (2), latina (2), deutsch (2), english (2), sign (2), our (2), third (2), action (2), join (2), site (2), youtube (2), events (2), contact (2), pricing (2), products (2), incorrect (2), sample (2), last (2), updated (2), 2026 (2), utc (2), otherwise (2), licensed (2), details (2), license (2), feedback (2), identity (2), increase (2), startup (2), deploy (2), refresh (2), certificate (2), googleapi (2), exceeded (2), metric (2), consumer (2), project_number (2), ratelimitexceeded (2), minute (2), 429 (2), there (2), starts (2), 2021 (2), like (2), 3307 (2), protocol (2), over (2), policy (2), target (2), lives (2), another (2), notauthorized (2), predefined (2), where (2), having (2), specific (2), current (2), separated (2), whether (2), cat (2), usr (2), grep (2), define (2), unix_path_max (2), change (2), operating (2), characters (2), defined (2), diagnose (2), helpful (2), working (2), kind (2), targetlink (2), pending (2), inserttime (2), 2020 (2), 16t02 (2), 281z (2), operationtype (2), targetid (2), selflink (2), targetproject (2), receive (2), response (2), webrequest (2), contenttype (2), infile (2), uri (2), into (2), http (2), replacements (2), rest (2), enforce (2), workloads (2), stop (2), mnt (2), stateful_partition (2), optimized (2), writeable (2), written (2), commands (2), launch (2), mixing (2), ip_address (2), user_name (2), hostname (2), would (2), accessed (2), allowpublickeyretrieval (2), later (2), resource (2), primary (2), replica (2), failover (2), switchover (2), advanced (2), want (2), establish (2), menu (2), field (2), included (2), legacy (2), www (2), platform (2), necessary (2), credential (2), supports (2), instructions (2), filename (2), includes (2), repository (2), latest (2), int (2), docs (2), refer (2), exists (2), could (2), mode (2), invalid (2), your_db_name (2), your_db_password (2), your_db_user (2), function (2), vote_development (2), mysql2 (2), adapter (2), ruby (2), errorf (2), parsetime (2), fatal (2), fatalf (2), connectunixsocket (2), driver (2), userid (2), disabled (2), mysqlsslmode (2), sslmode (2), uid (2), pwd (2), mysqlclient (2), createpool (2), async (2), createunixsocketpool (2), promise (2), node (2), lazy (2), cloudsqlrefreshstrategy (2), cpu (2), environments (2), than (2), cloudsqlinstance (2), setpassword (2), root (2), setusername (2), info (2), building (2), specifies (2), behaviors (2), createconnectionpool (2), connectionpoolfactory (2), extends (2), javax (2), unix_socket_path (2), drivername (2), create_engine (2), base (2), def (2), python (2), statement (2), dbtcphost (2), connecttcpsocket (2), crypto (2), dbconfig (2), createtcppool (2), force (2), work (2), installing (2), don (2), possible (2), connectionname (2), copy (2), already (2), port_number (2), binding (2), interface (2), related (2), buster (2), alpine (2), distroless (2), right (2), rename (2), darwin (2), mac (2), amd64 (2), begin (2), apis (2), serviceusage (2), endpoints (2), languages (2), frameworks (2), infrastructure (2), costs (2), monitoring (2), networking (2), industry (2), solutions (2), distributed (2), hybrid (2), multicloud (2), pipelines (2), hosting (2), disk (2), known (2), remove (2), loss (2), enabling (2), automated (2), number (2), memory (2), cache (2), improve (2), enterprise (2), plus (2), agents (2), saved (2), generate (2), predictions (2), dump (2), point (2), time (2), back (2), replicate (2), pools (2), regional (2), phpmyadmin (2), authorize (2), cmek (2), parameterized (2), views (2), studio (2), minor (2), edition (2), updates (2), shrink (2), cross (2), technology (2), areas (2), close (2), subscribe, newsletter, decade, climate, cookies, privacy, tech, twitter, blog, engage, training, certification, center, release, notes, forums, sales, marketplace, easy, easytounderstand, solved, solvedmyproblem, otherup, hard, hardtounderstand, incorrectinformationorsamplecode, missingtheinformationsamplesineed, otherdown, tell, noted, registered, trademark, oracle, affiliates, developers, apache, creative, commons, attribution, levels, next, misusing, unnecessarily, after, unnecessary, failed, ephemeral, once, reports, parsing, ignoring, due, breached, message, correctly, looking, section, successful, looks, logging, explorer, direct, outbound, firewall, allows, were, listing, comma, delimiter, spaces, specifying, ports, means, been, given, appspot, gserviceaccount, misspelled, names, cloud_sql_instances, yaml, searching, often, solve, pipe, watch, trouble, few, things, causing, becomes, date, checking, releases, myinstanceuser, myinstance2user, give, myuser, space, way, chosen, minimize, differences, overall, minimum, incorporated, longer, imposed, invocations, returned, reserve, mixed, problems, goes, stdout, unless, redirected, tips, limitation, similarly, mind, communicate, encrypted, reason, ensure, trusted, able, party, managers, monitors, restarts, stops, responding, finished, credential_file, path_to_guest_target, path_to_host_target, argumentlist, filepath, trailing, useful, syntax, managing, wildcard, result, full, purpose, because, advantage, doing, compromising, dbhost, configurations, allow, matches, mapping, configuring, clients, global, performing, occurs, detects, changes, attempts, ipv4, downloaded, move, drop, finish, done, administrator, viewer, least, resourcemanager, setiampolicy, recognizable, continue, descriptive, proper, sqlservice, scopes, scope, places, covered, earlier, follows, logic, documented, others, outlined, approach, authenticates, successfully, containing, installed, personal, especially, google_application_credentials, oauth, access_token, detailed, adding, granting, absolute, relative, several, alternatives, checks, items, order, first, finds, attempt, rsa, behalf, above, cover, most, common, cases, topics, initunixdatabaseconnection, databaseunix, connect_unix, unixsocket, mysqlconnectionprotocol, connectionprotocol, newmysqlunixsocketconnectionstring, mysqlunix, socketpath, refreshes, throttling, serverless, needed, rather, scheduled, interval, null, preferable, call, natively, connectorconnectionpoolfactory, socket_path, cloud_sql_instance_name, connect_unix_socket, inittcpdatabaseconnection, databasetcp, deploying, newmysqltcpconnectionstring, mysqltcp, connect_tcp, errors, x509, tcpconnectionpoolfactory, requirements, pom, xml, iptypes, represented, connect_tcp_socket, enables, snippets, complete, they, together, prompted, starting, deprecated, mysql_native_password, important, upgrading, directions, commas, dynamically, parameters, metadata, prefix, exposed, accessible, window, surpass, own, live, mkdir, 777, exist, posix, mechanism, folder, communication, processes, advantages, improved, lower, latency, platforms, explicitly, alternatively, listens, localhost, careful, anyone, warning, binary, opens, those, systems, compile, serves, artifact, transition, x86, x64, arm64, repeat, apt, 386, uname, optional, likely, grant, serviceusageadmin, optionally, grants, condition, authorizes, principal, basic, introduction, recommend, pattern, shares, pod, sidecar, paths, wraps, layer, validates, describes, postgresql, categorize, preferences, stay, organized, collections, home, updating, orphan, debug, messages, looker, rotate, broad, ranges, underprovisioned, overprovisioned, idle, temporary, increasing, retention, out, definitions, reliability, apply, recommendations, index, advisor, natural, querydata, conversational, securing, agent, interactions, remote, preview, filter, register, interact, models, llm, powered, langchain, embedding, workflow, online, integrate, vertex, generative, develop, cancel, parallel, csv, importing, exporting, deleted, enhanced, percona, xtrabackup, physical, large, replicating, autoscaling, lag, promote, functions, operator, authority, across, vpcs, brute, protection, controls, side, attach, fine, grained, conditions, handle, residency, knowledge, catalog, gemini, statements, character, collation, operational, guidelines, general, migrating, versions, peering, allowlists, self, connectivity, tests, locations, flags, deletion, delete, label, clone, edit, series, plan, prepare, computer, features, editions, discover, skip, main,
Text of the page (random words):
out of memory events prevent data loss by enabling automated backups prevent data loss by increasing backup retention reconfigure connection settings reconfigure log settings reconfigure temporary table settings reduce idle cloud sql instances reduce overprovisioned cloud sql instances reduce underprovisioned cloud sql instances remove authorized networks remove broad public ip ranges rotate server certificates set instance password policies set user password policies use looker with cloud sql troubleshoot known issues troubleshoot error messages debug connection issues diagnose issues orphan tables issues updating storage capacity high disk usage issues ai and ml application development application hosting compute data analytics and pipelines databases distributed hybrid and multicloud industry solutions migration networking observability and monitoring security storage access and resources management costs and usage management infrastructure as code sdk languages frameworks and tools home documentation databases cloud sql mysql guides send feedback connect using the cloud sql auth proxy stay organized with collections save and categorize content based on your preferences mysql postgresql sql server this page describes how to connect to your cloud sql instance using the cloud sql auth proxy for more information about how the cloud sql auth proxy works see about the cloud sql auth proxy overview using the cloud sql auth proxy is the recommended method for connecting to a cloud sql instance the cloud sql auth proxy works with both public and private ip endpoints validates connections using credentials for a user or service account wraps the connection in a ssl tls layer that s authorized for a cloud sql instance some google cloud services and applications use the cloud sql auth proxy to provide connections for public ip paths with encryption and authorization including app engine standard environment app engine flexible environment cloud run applications running in google kubernetes engine can connect using the cloud sql auth proxy note for connecting from google kubernetes engine we recommend running the cloud sql auth proxy in a sidecar pattern as an additional container that shares a pod with your application also see the related quickstart see the quickstart for using the cloud sql auth proxy for a basic introduction to its usage you can also connect with or without the cloud sql auth proxy using a mysql client from a local machine or compute engine before you begin before you can connect to a cloud sql instance do the following for a user or service account make sure the account has the cloud sql client role this role contains the cloudsql instances connect permission which authorizes a principal to connect to all cloud sql instances in a project go to the iam page you can optionally include an iam condition in the iam policy binding that grants the account permission to connect only to one specific cloud sql instance enable the cloud sql admin api roles required to enable apis to enable apis you need the serviceusage services enable permission if you created the project then you likely already have this permission through the owner role roles owner otherwise you can get this permission through the service usage admin role roles serviceusage serviceusageadmin learn how to grant roles enable the api install and initialize the gcloud cli optional install the cloud sql auth proxy docker client download the cloud sql auth proxy before you begin you must determine your machine s architecture if running on linux or mac you can find this by running the following command uname a linux 64 bit download the cloud sql auth proxy curl o cloud sql proxy https storage googleapis com cloud sql connectors cloud sql proxy v2 23 0 cloud sql proxy linux amd64 make the cloud sql auth proxy executable chmod x cloud sql proxy linux 32 bit download the cloud sql auth proxy curl o cloud sql proxy https storage googleapis com cloud sql connectors cloud sql proxy v2 23 0 cloud sql proxy linux 386 if the curl command is not found run sudo apt install curl and repeat the download command make the cloud sql auth proxy executable chmod x cloud sql proxy macos 64 bit download the cloud sql auth proxy curl o cloud sql proxy https storage googleapis com cloud sql connectors cloud sql proxy v2 23 0 cloud sql proxy darwin amd64 make the cloud sql auth proxy executable chmod x cloud sql proxy mac m1 download the cloud sql auth proxy curl o cloud sql proxy https storage googleapis com cloud sql connectors cloud sql proxy v2 23 0 cloud sql proxy darwin arm64 make the cloud sql auth proxy executable chmod x cloud sql proxy windows 64 bit right click https storage googleapis com cloud sql connectors cloud sql proxy v2 23 0 cloud sql proxy x64 exe and select save link as to download the cloud sql auth proxy rename the file to cloud sql proxy exe windows 32 bit right click https storage googleapis com cloud sql connectors cloud sql proxy v2 23 0 cloud sql proxy x86 exe and select save link as to download the cloud sql auth proxy rename the file to cloud sql proxy exe cloud sql auth proxy docker image the cloud sql auth proxy has different container images such as distroless alpine and buster the default cloud sql auth proxy container image uses distroless which contains no shell if you need a shell or related tools then download an image based on alpine or buster for more information see cloud sql auth proxy container images you can pull the latest image to your local machine using docker by using the following command docker pull gcr io cloud sql connectors cloud sql proxy 2 23 0 note the cloud sql auth proxy uses a repository that supports the gcr io domain but serves images from artifact registry for more information see transition from container registry other os for other operating systems not included here you can compile the cloud sql auth proxy from source start the cloud sql auth proxy depending on your language and environment you can start the cloud sql auth proxy using tcp sockets unix sockets or the cloud sql auth proxy docker image the cloud sql auth proxy binary connects to one or more cloud sql instances specified on the command line and opens a local connection as either tcp or a unix socket other applications and services such as your application code or database management client tools can connect to cloud sql instances through those tcp or unix socket connections warning be careful when binding the cloud sql auth proxy to an external interface anyone with access to that interface port will be authorized to connect to your instance tcp sockets for tcp connections the cloud sql auth proxy listens on localhost 127 0 0 1 by default so when you specify port port_number for an instance the local connection is at 127 0 0 1 port_number alternatively you can specify a different address for the local connection for example here s how to make the cloud sql auth proxy listen at 0 0 0 0 1234 for the local connection cloud sql proxy address 0 0 0 0 port 1234 instance_connection_name copy your instance_connection_name this can be found on the overview page for your instance in the google cloud console or by running the following command gcloud sql instances describe instance_name format value connectionname for example myproject myregion myinstance if the instance has both public and private ip configured and you want the cloud sql auth proxy to use the private ip address you must provide the following option when you start the cloud sql auth proxy private ip if you are using a service account to authenticate the cloud sql auth proxy note the location on your client machine of the private key file that was created when you created the service account start the cloud sql auth proxy some possible cloud sql auth proxy invocation strings using cloud sdk authentication cloud sql proxy port 3306 instance_connection_name the specified port must not already be in use for example by a local database server using a service account and explicitly including the name of the instance connection recommended for production environments cloud sql proxy credentials file path_to_key_file instance_connection_name for more information about cloud sql auth proxy options see options for authenticating the cloud sql auth proxy unix sockets note the cloud sql auth proxy currently does not support unix sockets on windows so this option is only available for linux and macos platforms the cloud sql auth proxy can listen on a unix socket which is a posix standard mechanism for using a folder to manage communication between two processes running on the same host advantages to using unix sockets are improved security and lower latency however you cannot access a unix socket from an external machine to create and use a unix socket the target directory must exist and both the cloud sql auth proxy and application must have read and write access to it copy your instance_connection_name this can be found on the overview page for your instance in the google cloud console or by running the following command gcloud sql instances describe instance_name format value connectionname for example myproject myregion myinstance create the directory where the cloud sql auth proxy sockets will live sudo mkdir cloudsql sudo chmod 777 cloudsql if you are using a service account to authenticate the cloud sql auth proxy note the location on your client machine of the private key file that was created when you created the service account open a new cloud shell terminal window and start the cloud sql auth proxy some possible cloud sql auth proxy invocation strings using google cloud sdk authentication cloud sql proxy unix socket cloudsql instance_connection_name using a service account cloud sql proxy unix socket cloudsql credentials file path_to_key_file instance_connection_name start the cloud sql auth proxy in its own cloud shell terminal so you can monitor its output without it mixing with the output from other programs for more information about cloud sql auth proxy options see options for authenticating the cloud sql auth proxy note when using a unix socket to connect to cloud sql using the cloud sql auth proxy make sure the socket filename s length does not surpass the system s limit it depends on the system but it s usually between 91 108 characters on linux the length is usually defined as 108 and you can use the following command to check cat usr include linux un h grep define unix_path_max docker to run the cloud sql auth proxy in a docker container use the cloud sql auth proxy docker image available from the google container registry you can start the cloud sql auth proxy using either tcp sockets or unix sockets with the commands shown below the options use an instance_connection_name as the connection string to identify a cloud sql instance you can find the instance_connection_name on the overview page for your instance in the google cloud console or by running the following command gcloud sql instances describe instance_name for example myproject myregion myinstance note the cloud sql auth proxy doesn t support listening on unix domain sockets on windows depending on your language and environment you can start the cloud sql auth proxy using either tcp sockets or unix sockets unix sockets are not supported for applications written in the java programming language or for the windows environment using tcp sockets docker run d v path_to_key_file path to service account key json p 127 0 0 1 3306 3306 gcr io cloud sql connectors cloud sql proxy 2 23 0 address 0 0 0 0 port 3306 credentials file path to service account key json instance_connection_name if you re using the credentials provided by your compute engine instance don t include the credentials file parameter and the v path_to_key_file path to service account key json line always specify 127 0 0 1 prefix in p so that the cloud sql auth proxy is not exposed outside the local host the 0 0 0 0 in the instances parameter is required to make the port accessible from outside of the docker container using unix sockets docker run d v cloudsql cloudsql v path_to_key_file path to service account key json gcr io cloud sql connectors cloud sql proxy 2 23 0 unix socket cloudsql credentials file path to service account key json instance_connection_name if you re using the credentials provided by your compute engine instance don t include the credentials file parameter and the v path_to_key_file path to service account key json line if you are using a container optimized image use a writeable directory in place of cloudsql for example v mnt stateful_partition cloudsql cloudsql you can specify more than one instance separated by commas you can also use compute engine metadata to dynamically determine the instances to connect to learn more about the cloud sql auth proxy parameters connect with the mysql client download the mysql community server for your platform from the mysql community server download page the community server includes the mysql client install the community server following the directions on the download page for more information about installing mysql see installing and upgrading mysql the connection string you use depends on whether you started the cloud sql auth proxy using a tcp socket or a unix socket or docker important starting in cloud sql for mysql 8 4 the mysql_native_password authentication plugin is deprecated and new database users are created with the caching_sha2_password plugin to connect using the cloud sql auth proxy and the caching_sha2_password plugin over a tcp socket connection add the get server public key flag unix socket connections using the cloud sql auth proxy with the caching_sha2_password plugin are not supported tcp sockets start the mysql client mysql u username p host 127 0 0 1 if you re connecting to a mysql 8 4 instance then use the following command mysql u username p host 127 0 0 1 get server public key when you connect using tcp sockets the cloud sql auth proxy is accessed through 127 0 0 1 if prompted enter the password the mysql prompt appears using unix sockets start the mysql client mysql u username p s cloudsql instance_connection_name get server public key enter the password the mysql prompt appears need help for help troubleshooting the proxy see troubleshooting cloud sql auth proxy connections or see our cloud sql support page connect with an application you can connect to the cloud sql auth proxy from any language that enables you to connect to a unix or tcp socket below are some code snippets from complete examples on github to help you understand how they work together in your application connecting with tcp cloud sql auth proxy invocation statement cloud sql proxy instance_connection_name python to see this snippet in the context of a web application view the readme on github import os import sqlalchemy def connect_tcp_socket sqlalchemy engine base engine initializes a tcp connecti...
|