Define a minimum of 1 vCPU or more to avoid cold starts that can take a few seconds.
SQL Databases - Quickstart
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
-
Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.
-
Click + Create database. The database creation wizard displays.
-
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- 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.
-
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
-
From the Overview tab of your database, click the Set up credentials button. The setup wizard displays.
-
Select yourself as the principal to connect to the database.
NoteRefer to the IAM documentation for more information on identities and access rights.
-
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.
- If you already have a secret key, replace the
-
Copy your connection string and store it securely.
-
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. -
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 -
Press
q
to quit the version overview.
You can now perform the authorized actions in the database.
How to delete a database
-
Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.
-
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.
-
Type DELETE, then click Delete database.
- 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.