Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (25 sloc) 1.82 KB

Getting started with Managed Service for PostgreSQL

To use the service, create a cluster and connect to a DBMS:

  1. All you need to create a database cluster is a folder in Yandex.Cloud that you are allowed to access. If you already have a folder in Yandex.Cloud, open the page of that folder in the management console. If there is no folder yet, create one:

    {% include create-folder %}

  2. You can connect to DB clusters from both inside and outside of the Cloud:

    1. To connect to a DB cluster from inside the Cloud, create a VM in the same network as the DB cluster (based on Linux or [Windows](../compute/quickstart/quick-create-windows md))
    2. To enable connection to a cluster over the internet, request external IP addresses for hosts when creating the cluster.
  3. In the management console, select the folder where you want to create a DB cluster.

  4. Select Managed Service for PostgreSQL.

  5. Click Create cluster and select the necessary DBMS.

  6. Set the cluster parameters and click Create cluster. This process is described in detail in #T.

  7. When the cluster is ready, its status in the Managed Service for PostgreSQL dashboard will change to RUNNING.

  8. To connect to the DB server, an SSL certificate is required. You can prepare all the necessary authentication data as follows:

    $ mkdir ~/.postgresql
    $ wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" -O ~/.postgresql/CA.pem
  9. You can connect to the database using the psql command (for more information, see #T):

    $ psql "host=<host address> \
          port=6432 \
          sslmode=verify-full \
          dbname=<DB name> \
          user=<DB username>"
    
You can’t perform that action at this time.