NavigationContentFooter
Jump toSuggest an edit

PostgreSQL and MySQL - Quickstart

Reviewed on 09 January 2024Published on 26 May 2021

Managed Database for PostgreSQL and MySQL provides fully-managed relational Database Instances, with MySQL or PostgreSQL as database engines.

The resource allows you to focus on development rather than administration or configuration. It comes with a high-availability mode, data replication, and automatic backups.

Compared to traditional database management, which requires customers to provide their infrastructure and resources to manage their databases, Managed Database for PostgreSQL and MySQL Instance offers the user access to Database Instances without setting up the hardware or configuring the software. Scaleway handles the provisioning, manages the configuration, and provides useful features, as high availability, automated backup, user management, and more.

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

How to create a database

  1. Click PostgreSQL and MySQL under Managed Databases on the side menu, if you do not have a Database Instance already created, the creation page displays.

  2. Click Create Database Instance. The creation wizard displays.

  3. Complete the following steps in the wizard:

    • Select a database engine. PostgreSQL and MySQL are available.
    • Choose a region. This is the geographical location where your database will be deployed.
    • Select a database configuration. You can choose between:
      • High Availability: creates a secondary Instance with an up-to-date replica of the database. If the primary Instance fails, the secondary takes over requests.
      • Standalone: creates a standalone database provisioned on a single node.
    • Select a node type.
    • Choose your storage type and capacity. Two types of storage are available:
      • Basic Block Storage: With this type, your storage is decoupled from your compute resources. You can increase your storage space without changing your node type. You can define your storage capacity by entering the desired amount in the box. The volume can be increased up to 10 TB.

      • Block Storage Low Latency: This storage type works like Basic Block Storage, while providing lower latency and high resiliency through 5k IOPS. You can increase your volume to up to 10 TB.

      • Local SSD Storage: Your storage is fixed and tied to your compute resource.

      Note

      The local storage option is only available with the first-generation node types.

    • Select the snapshot configuration. You can either leave the default Automatic option to enable autobackups or select Manual snapshots.
    • Add a name and set a password for your user.
    Important

    Your username must adhere to specific criteria.

    • Length must be between 1 and 63 characters
    • First character must be an alphabetic character (a-Za-Z)
    • It can not start with _rdb
    • Only a-zA-Z0-9_$- characters are accepted
    • Enter a name for your Instance.
  4. Click Create Database Instance to confirm your choices and launch creation.

    You are taken to the Overview tab for your database, where you can see information including the Endpoint to enable you to connect to your database.

How to add users

  1. Click PostgreSQL and MySQL under Managed Databases on the side menu. A list of your Database Instances displays.

  2. Click the database name or «See more Icon» > More info to access the Database Instance information page.

  3. Go to the Users tab. A list of users displays. If it is the first time you create a user, your list will display the user you set up during the creation of your Database Instance.

  4. Click + Create user to create a new user, if you wish to.

  5. Click «Toogle Icon» to grant admin rights to the user.

    Note

    Admin rights allow a user to create logical databases and users. These rights do not override the permissions configured for the logical databases. Logical database permissions must be set up in the Permissions tab.

  6. Enter a username and password.

    Note

    Optionally, you can configure the appropriate permissions according to the user. Three types of permissions are available:

    • None: No access to the database
    • Read: Allow users to read tables and fields in a database
    • Write: Allow users to write content in databases You can select the permission type in the Permissions tab.
  7. Click Create user to confirm.

    Once the user is created, it is displayed in the user list.

To update the password or permissions, or delete the user, click «See more Icon» to display the respective options.

How to delete your database

  1. Click PostgreSQL and MySQL under Managed Databases on the side menu. A list of your Database Instances displays.
  2. Click the database name or «See more Icon» > More info to access the Database Instance information page.
  3. Scroll down the page to the Delete Database Instance section and click Delete Database Instance. A pop-up appears to inform that:
    Important

    This action is irreversible and will permanently delete this Database Instance and all its associated data.

  4. Type DELETE to confirm and click Delete Database Instance.
    Tip

    Alternatively, you can delete your Instance from your Database Instances list by clicking «See more Icon» next to the Instance name and then Delete.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway