Parameter Name | Required | Type | Description |
Zone | Yes | string | Availability zone ID. Valid values: ap-shanghai-2, ap-beijing-3, ap-guangzhou-2 |
DBInstanceName | Yes | string | TencentDB instance name. This value must be unique for the same account. |
DBVersion | Yes | string | Database version. Valid value: 10.4 |
DBCharset | Yes | string | PostgreSQL database character set. Valid values: UTF8, LATIN1 |
VpcId | No | string | VPC ID. If this parameter is left empty, the instance will be assigned with a classic network IP. |
SubnetId | No | string | VPC subnet ID. This parameter should be used together with VpcId . |
{"Response": {"RequestId": "20304c-6fd7-4427-8e09-2b081e1","DBInstanceId": "postgres-xxxxxxx"}}
DBInstanceId
refers to the instance ID.{"Response": {"TotalCount": 1,"DBInstanceSet": [{"DBInstanceId": "postgres-xxxxxxx","DBInstanceName": "test","DBInstanceStatus": "running",#TencentDB instance status"Region": "ap-shanghai","Zone": "ap-shanghai-2","ProjectId": 0,"VpcId": "vpc-test","SubnetId": "subnet-test","DBCharset": "UTF8","DBVersion": "10.4","CreateTime": "2020-03-23 11:43:56","DBInstanceNetInfo": [{"Address": "","Ip": "10.1.1.2", #This IP is used as an example. The IP can be accessed over the same subnet and the same private network."Port": 5432, #Connect to the port"Status": "opened","NetType": "private"},{"Address": "","Ip": "","Port": 0,"Status": "0","NetType": "public"}],"DBAccountSet": [{"DBUser": "tencentdb_xxxxxxx","DBPassword": "**************",#Database password. After the password has been reset, the parameter value returned by this API will be invalid."DBConnLimit": 100}],"DBDatabaseList": ["tencentdb_xxxxxxx"]}],"RequestId": "89583d-cfdd-4db1-bd32-64eb1dbfa"}}
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpmyum install postgresql10 postgresql10.x86_64
psql -U database username -h IP address -p port number
tencentdb_xx>
indicates successful connection.
postgres
system database
Was this page helpful?