Während der Datenbankmigration muss die Zieldatenbank eine Verbindung zur Quelldatenbank herstellen. Database Migration Service bietet mehrere Möglichkeiten, diese Verbindung zu konfigurieren. Die von Ihnen gewählte Verbindungsmethode hängt vom Typ der Quelldatenbank ab und davon, ob sie lokal, in Google Cloudoder bei einem anderen Cloud-Anbieter gehostet wird.
Sie können die folgenden Verbindungsmethoden konfigurieren:
IP-Zulassungslisten: Wählen Sie diese Methode aus, wenn Sie öffentliche Verbindungen verwenden möchten.
Reverse-SSH-Tunnel über eine in der Cloud gehostete VM: Wählen Sie diese Methode aus, wenn Sie eine sichere Verbindung verwenden möchten und kein VPC-Netzwerk (Virtual Private Cloud) in Google Cloud haben, über das Sie die Quelldatenbank erreichen können.
Private Verbindung: Wählen Sie diese Methode aus, wenn die Zieldatenbank eine Verbindung zur privaten IP-Adresse Ihrer Quelle herstellen soll. Es gibt zwei Arten von privaten Verbindungen:
Private Service Connect-Schnittstellen:
Mit dieser Verbindungsmethode kann Ihre Zieldatenbank Verbindungen zur privaten IP-Adresse Ihrer Quelldatenbank initiieren, ohne dass das Peering-Kontingent aufgebraucht wird. Stattdessen werden für Private Service Connect-Schnittstellen Netzwerkanhänge verwendet, die Sie in Ihrer VPC erstellen.
VPC-Peering: Für diese Methode benötigen Sie ein VPC-Netzwerk in Google Cloud , über das Sie auf die Quelldatenbank zugreifen können.
Verwenden Sie VPC-Peering, wenn Sie eine VPN- oder Cloud Interconnect-Verbindung in Google Cloudeingerichtet haben.
TCP-Proxy über in der Cloud gehostete VM: Wählen Sie diese Methode aus, wenn Sie von einer Cloud SQL for PostgreSQL-Instanz migrieren, die die alte Architektur für das Erstellernetzwerk verwendet.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[[["\u003cp\u003eDatabase Migration Service requires the destination AlloyDB for PostgreSQL to connect to the source PostgreSQL database.\u003c/p\u003e\n"],["\u003cp\u003eThe choice of connectivity method depends on the source database type and its location (on-premises, Google Cloud, or another cloud provider).\u003c/p\u003e\n"],["\u003cp\u003eConnectivity options include public connectivity via IP allowlists, secure connectivity via a reverse SSH tunnel using a cloud-hosted VM, and private connectivity via VPC peering.\u003c/p\u003e\n"],["\u003cp\u003eTCP Proxy via a cloud-hosted VM is a connectivity option for migrating from a Cloud SQL for PostgreSQL instance with the old producer network architecture.\u003c/p\u003e\n"]]],[],null,["# Configure connectivity\n\n\u003cbr /\u003e\n\n[MySQL](/database-migration/docs/mysql/configure-connectivity \"View this page for the MySQL version of Database Migration Service.\") \\| [PostgreSQL](/database-migration/docs/postgres/configure-connectivity \"View this page for the PostgreSQL version of Database Migration Service.\") \\| PostgreSQL to AlloyDB\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nDuring database migration, the destination database needs to connect\nto the source database. Database Migration Service provides several ways to configure\nthis connectivity. The connectivity method you choose depends on the type of\nsource database, and whether it resides on-premises, in Google Cloud, or in another\ncloud provider.\n\nYou can configure the following connectivity methods:\n\n- [IP allowlists](/database-migration/docs/postgresql-to-alloydb/configure-connectivity-ip-allowlists): Choose this method if you want to use public connectivity.\n- [Reverse SSH tunnel using a cloud-hosted VM](/database-migration/docs/postgresql-to-alloydb/configure-connectivity-reverse-ssh-tunnel): Choose this method if you want to use secure connectivity, and when you don't have a virtual private cloud (VPC) network in Google Cloud from which you can reach the source database.\n- Private connectivity: Choose this method if you want the destination database to connect to the private IP of your source. There are two types of private connectivity available:\n - [Private Service Connect interfaces](/database-migration/docs/postgresql-to-alloydb/configure-connectivity-vpc-peering#psc-interfaces): This connectivity method lets your destination database initiate connections to the private IP of your source database without consuming peering quota. Instead, Private Service Connect interfaces use network attachments you create in your VPC.\n - [VPC peering](/database-migration/docs/postgresql-to-alloydb/configure-connectivity-vpc-peering#vpc-peering): This method requires that you have a VPC network in Google Cloud from which you can reach the source database. Use VPC peering if you have a [VPN](/database-migration/docs/postgresql-to-alloydb/configure-connectivity-vpns) or Cloud Interconnect connection set up in Google Cloud.\n- [TCP Proxy via cloud-hosted VM](/database-migration/docs/postgresql-to-alloydb/configure-connectivity-tcp-proxy-via-cloud-hosted-vm): Choose this method when migrating from a Cloud SQL for PostgreSQL instance that uses the old producer network architecture.\n\nWhat's next\n-----------\n\n- Learn more about [private services access](/vpc/docs/private-services-access).\n- Learn more about [Private Service Connect interfaces](/vpc/docs/about-private-service-connect-interfaces).\n- Learn more about [using VPC peering](/vpc/docs/using-vpc-peering)."]]