NavigationContentFooter
Jump toSuggest an edit

SQL Databases - Quickstart

Reviewed on 12 August 2024Published on 11 August 2023

Scaleway Serverless SQL Databases are fully managed databases that automatically scale in storage and compute according to your workloads.

This page explains how to create, access, and delete a Serverless SQL Database using the Scaleway console.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • Installed the psql CLI tool (built-in with PostgreSQL).

How to create a database

  1. Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.

  2. Click + Create database. The database creation wizard displays.

  3. Complete the following steps in the wizard:

    • Choose a region, the geographical location in which your database will be created.
    • Select a default engine version from the drop-down menu.
    • Configure your database autoscaling, or keep the default values. Your database will scale within the defined range to match the incoming load.
    Note

    Define a minimum of 1 vCPU or more to avoid cold starts that can take a few seconds.

    • Enter a name for your database, or keep the randomly generated name. The name must only contain alphanumeric characters and dashes.
    • Verify the estimated cost.
  4. Click Create database to finish. The setting up of your database will take a few seconds. Check the Overview tab to see its status.

How to connect to a database

  1. From the Overview tab of your database, click the Set up credentials button. The setup wizard displays.

  2. Select yourself as the principal to connect to the database.

    Note

    Refer to the IAM documentation for more information on identities and access rights.

  3. Set up the Connection string:

    • If you already have a secret key, replace the [INSERT_SECRET_KEY_HERE] placeholder with your key.
    • If you do not have a secret key, click Generate new secret key.
  4. Copy your connection string and store it securely.

  5. Run the following command in a terminal:

    psql "[YOUR_CONNECTION_STRING]"

    An output similar to the following response displays:

    psql (15.3, server 14.8 (Debian 14.8-1pgsg120+1))
    SSL connection (protocol: TLSv1.3, cipher: TLS_AES_128_GCM_SHA256, compression: off)
    Type "help" for help.
  6. Run the following command to see the version of your Serverless SQL Database:

    SELECT version ();

    An output similar to the following displays:

    PostgreSQL 14.8 (Debian 14.8-1.pgdg120+1) on x86_64-pc-linux-gnu,
    compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
  7. Press q to quit the version overview.

You can now perform the authorized actions in the database.

How to delete a database

  1. Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.

  2. Click the «See more Icon» icon next to the database you want to delete and select Delete from the drop-down menu. A pop-up displays.

  3. Type DELETE, then click Delete database.

Tip
  • You can also delete a database from its Overview tab.
  • You can delete several databases by selecting the appropriate items from the SQL databases section and clicking the icon.
Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway