이 페이지의 일부 또는 모든 정보는 Trusted Cloud by S3NS에 적용되지 않을 수 있습니다. 자세한 내용은
Google Cloud와의 차이점을 참조하세요.
Cloud SQL 언어 커넥터 개요
이 페이지에서는 Cloud SQL 언어 커넥터와 인스턴스에서 이 커넥터를 사용하는 방법을 간략하게 설명합니다.
Cloud SQL 언어 커넥터는 Cloud SQL 인스턴스에 연결할 때 암호화와 IAM 승인을 제공하는 라이브러리입니다.
Cloud SQL 언어 커넥터는 사용자 애플리케이션을 대신하여 프록시 측 서버에 승인된 연결을 만들고 애플리케이션의 데이터베이스 드라이버에 해당 연결을 전달합니다. Cloud SQL 인스턴스가 아직 없는 경우 Cloud SQL 인스턴스에 대한 네트워크 경로를 제공할 수 없습니다.
Cloud SQL 언어 커넥터는 클라이언트 측 구성요소를 사용하여 Cloud SQL 인스턴스의 프록시 서버에 연결합니다. 커넥터는 소유자가 서버 측 프록시에 연결하도록 승인하는 임시 인증서를 만듭니다. 서버 측 프록시는 연결을 위해 유효한 TLS 인증서를 요구하여 Cloud SQL 데이터베이스에 대한 액세스를 제한합니다.
Cloud SQL은 다음과 같은 Cloud SQL 언어 커넥터를 지원합니다.
Cloud SQL에서는 Cloud SQL 언어 커넥터를 사용하여 Cloud SQL 인스턴스에 연결하는 것을 권장합니다. 데이터베이스 클라이언트 또는 Cloud SQL 인증 프록시를 사용하여 Cloud SQL 인스턴스에 연결할 수도 있습니다. Cloud SQL 인스턴스에 연결하는 방법에 대한 자세한 내용은 연결 옵션 정보를 참조하세요.
요구사항
Cloud SQL 인스턴스에서 공유 인증 기관(CA)을 serverCaMode
로 사용하는 경우 클라이언트 측에서 사용 중인 Cloud SQL 언어 커넥터가 다음 버전 요구사항을 충족하는지 확인합니다.
Cloud SQL 인스턴스에서 고객 관리 CA를 serverCaMode
로 사용하는 경우 클라이언트 측에서 사용 중인 Cloud SQL 언어 커넥터가 다음 버전 요구사항을 충족하는지 확인합니다.
인스턴스가 고객 관리 CA를 서버 CA 모드로 사용하는 경우 커스텀 DNS 이름으로 인스턴스를 구성할 수 있습니다.
서버 인증서의 커스텀 주체 대체 이름(SAN) 필드에 커스텀 DNS 이름을 제공합니다.
인스턴스의 커스텀 DNS 이름을 설정한 후 DNS 이름을 사용하여 Cloud SQL 언어 커넥터에서 인스턴스에 연결할 수 있습니다.
Cloud SQL 언어 커넥터 이점
Cloud SQL 언어 커넥터는 Cloud SQL 인스턴스에 연결할 때 다음과 같은 이점을 제공합니다.
- IAM 승인: ID 및 액세스 관리(IAM) 권한을 사용하여 Cloud SQL 인스턴스에 연결할 수 있는 사용자 또는 대상을 제어합니다.
- 편의성: SSL 인증서 관리, 방화벽 규칙 구성 또는 승인된 네트워크 사용 설정에 대한 요구사항을 삭제합니다.
제한사항
컨텍스트 인식 액세스 및 IAM 데이터베이스 인증을 사용하는 경우 Cloud SQL 언어 커넥터를 사용할 수 없습니다. 인스턴스에 로그인하려고 하면 IAM 인증이 실패합니다.
Cloud SQL 언어 커넥터 사용 적용
커넥터 적용을 사용하면 Cloud SQL 인스턴스에 연결하는 데 Cloud SQL 인증 프록시나 Cloud SQL 언어 커넥터만 사용하도록 적용할 수 있습니다. 커넥터 적용을 사용하면 Cloud SQL에서 데이터베이스에 대한 직접 연결을 거부합니다.
Private Service Connect 지원 인스턴스를 사용하는 경우에는 제한사항이 있습니다. 인스턴스에 커넥터 적용이 사용 설정된 경우 인스턴스의 읽기 복제본을 만들 수 없습니다. 마찬가지로 인스턴스에 읽기 복제본이 있으면 인스턴스에 커넥터 적용을 사용 설정할 수 없습니다.
인스턴스에 연결하는 데 Cloud SQL 인증 프록시나 Cloud SQL 언어 커넥터만 사용하도록 적용하는 방법에 대한 자세한 내용은 Cloud SQL 언어 커넥터를 사용하여 연결을 참조하세요.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-19(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-19(UTC)"],[],[],null,["# Cloud SQL Language Connectors overview\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/language-connectors \"View this page for the PostgreSQL database engine\") \\| [SQL Server](/sql/docs/sqlserver/language-connectors \"View this page for the SQL Server database engine\")\n\n\u003cbr /\u003e\n\nThis page summarizes the Cloud SQL Language Connectors and how to use them\nwith your instances.\n\nCloud SQL Language Connectors are libraries that provide encryption and\n[IAM](/iam) authorization when connecting to a Cloud SQL instance.\nCloud SQL Language Connectors create authorized connections to the\nproxy-side server on behalf of a user's application and pass that connection to\nthe application's database driver. They don't provide a network path to a\nCloud SQL instance if one is not already present.\n\nCloud SQL Language Connectors use a client-side component to connect to a proxy server\non the Cloud SQL instance. The connector creates a temporary certificate\nthat authorizes the holder to connect to the server-side proxy. The server-side\nproxy limits access to the Cloud SQL database by requiring a valid TLS\ncertificate in order to connect.\n\nCloud SQL supports the following Cloud SQL Language Connectors:\n\n- [Cloud SQL Java connector](/sql/docs/mysql/connect-connectors#java)\n- [Cloud SQL Python connector](/sql/docs/mysql/connect-connectors#python)\n- [Cloud SQL Go connector](/sql/docs/mysql/connect-connectors#go)\n- [Cloud SQL Node.js connector](/static/sql/docs/mysql/connect-connectors#node.js)\n\nCloud SQL recommends using Cloud SQL Language Connectors to connect to your\nCloud SQL instance. You can also connect to a Cloud SQL\ninstance [using a database client](/sql/docs/mysql/connect-admin-ip) or the\n[Cloud SQL Auth Proxy](/sql/docs/mysql/sql-proxy). For more information about\nconnecting to a Cloud SQL instance, see [About connection options](/sql/docs/mysql/connect-overview).\n\nRequirements\n------------\n\nIf your Cloud SQL instance uses\n[shared certificate authority (CA)](/sql/docs/mysql/authorize-ssl#shared-regional-ca)\nas its `serverCaMode`, then on the client side,\nmake sure that the Cloud SQL Language Connectors you're using meet\nthe following version requirements:\n\n- [Cloud SQL Java connector](/sql/docs/mysql/connect-connectors#java): [v1.21.0](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/releases/tag/v1.21.0) or later\n- [Cloud SQL Go connector](/sql/docs/mysql/connect-connectors#go): [v1.12.0](https://github.com/GoogleCloudPlatform/cloud-sql-go-connector/releases/tag/v1.12.0) or later\n- [Cloud SQL Node.js connector](/static/sql/docs/mysql/connect-connectors#node.js): [v1.4.0](https://github.com/GoogleCloudPlatform/cloud-sql-nodejs-connector/releases/tag/v1.4.0) or later\n\n| **Note:** [Cloud SQL Python connector](/sql/docs/mysql/connect-connectors#python) supports instances that use the shared CA configuration, but the connector doesn't verify server identity.\n\nIf your Cloud SQL instance uses\n[customer-managed CA](/sql/docs/mysql/authorize-ssl#customer-managed-ca)\nas its `serverCaMode`, then on the client side,\nmake sure that the Cloud SQL Language Connectors you're using meet\nthe following version requirements:\n\n- [Cloud SQL Java connector](/sql/docs/mysql/connect-connectors#java): [v1.22.0](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/releases/tag/v1.22.0) or later\n- [Cloud SQL Go connector](/sql/docs/mysql/connect-connectors#go): [v1.14.0](https://github.com/GoogleCloudPlatform/cloud-sql-go-connector/releases/tag/v1.14.0) or later\n- [Cloud SQL Node.js connector](/static/sql/docs/mysql/connect-connectors#node.js): [v1.6.0](https://github.com/GoogleCloudPlatform/cloud-sql-nodejs-connector/releases/tag/v1.6.0) or later\n\nWhen an instance uses customer-managed CA as its server CA mode, you can configure\nthe instance with a [custom DNS name](/sql/docs/mysql/configure-ssl-instance#custom-dns-name).\nYou provide the custom DNS name in the\ncustom subject alternative name (SAN) field of the server certificate.\n\nAfter you set up a custom DNS name for the instance, you can connect to the\ninstance from Cloud SQL Language Connectors using the DNS name.\n\nBenefits of Cloud SQL Language Connectors\n-----------------------------------------\n\nCloud SQL Language Connectors provide the following\nbenefits with connecting to a Cloud SQL instance:\n\n- **IAM authorization**: Uses identity and access management (IAM) permissions to control who or what can connect to your Cloud SQL instances.\n- **Convenience**: Removes the requirement to manage SSL certificates, configure firewall rules, or enable authorized networks.\n\n\u003cbr /\u003e\n\nLimitations\n-----------\n\nYou can't use the Cloud SQL Language Connectors if you're using\n[context-aware access](/iap/docs/cloud-iap-context-aware-access-howto) and\nIAM database authentication. When you try to login to the instance,\nIAM authentication fails.\n\nEnforce the use of Cloud SQL Language Connectors\n------------------------------------------------\n\nBy using [connector enforcement](/sql/docs/mysql/admin-api/rest/v1/instances#ConnectorEnforcement), you can enforce using only the Cloud SQL Auth Proxy or Cloud SQL Language Connectors to connect to Cloud SQL instances. With connector enforcement, Cloud SQL rejects direct connections to the database.\n\nIf you're using a [Private Service Connect-enabled instance](/sql/docs/mysql/about-private-service-connect), then there's a limitation. If the instance has connector enforcement enabled, then you can't create read replicas for the instance. Similarly, if the instance has read replicas, then you can't enable connector enforcement for the instance.\n\nFor more information about how to enforce using only the Cloud SQL Auth Proxy or Cloud SQL Language Connectors to connect to an instance, see [Connect using Cloud SQL Language Connectors](/sql/docs/mysql/connect-connectors#enforce).\n\nWhat's next\n-----------\n\n\u003cbr /\u003e\n\n- [Connect using the Cloud SQL Java Connector](/sql/docs/mysql/connect-connectors#java).\n- [Connect using the Cloud SQL Python Connector](/sql/docs/mysql/connect-connectors#python).\n- [Connect using the Cloud SQL Go Connector](/sql/docs/mysql/connect-connectors#go).\n- [Connect using the Cloud SQL Node.js Connector](/static/sql/docs/mysql/connect-connectors#node.js).\n- Learn more about the [Cloud SQL Auth Proxy](/sql/docs/mysql/sql-proxy).\n\n\u003cbr /\u003e"]]