To create a connection profile for PostgreSQL, run:
gdcloud database connection-profiles create postgresql pg-connection-profile-sample \
--password=123456 --username=my-user --host=1.2.3.4 --port=5432 --ca-certificate=/path/to/ca.crt
必要標記
--ca-certificate string file path for x509 PEM-encoded certificate of the CA that signed the database server's certificate.
--host string IP or hostname of the database.
--password string Password for the user that the migration service uses to connect to the database.
--username string Username that the migration service uses to connect to the database.
選用旗標
--client-certificate string file path for x509 PEM-encoded certificate that will be used by the replica to authenticate against the database server.
--port int32 Network port of the database. (default 5432)
--private-key string file path for Unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with the Client Certificate.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-19 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003egdcloud database connection-profiles create\u003c/code\u003e command is used to establish a connection profile for data migration for a specified database type.\u003c/p\u003e\n"],["\u003cp\u003eCreating a connection profile requires specifying the database type, connection profile name, username, password, host, and CA certificate.\u003c/p\u003e\n"],["\u003cp\u003eThe command allows for optional flags such as client certificate, private key, and port, with the default port for connections set to 5432.\u003c/p\u003e\n"],["\u003cp\u003eThere are global flags that are available for use with this command, including \u003ccode\u003e--configuration\u003c/code\u003e, \u003ccode\u003e--format\u003c/code\u003e, \u003ccode\u003e--help\u003c/code\u003e, \u003ccode\u003e--project\u003c/code\u003e, and \u003ccode\u003e--quiet\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]