Create a database schema

In this topic, you learn how you create a database schema with SQL client as you need a database to work with your virtual machine.

Prerequisites

Procedure

  1. Open your PostgreSQL database.

  2. Select Connection Security > Add client IP.

  3. Add your public IP address.

    Disable Enforce SSL connection in case your SQL client does not support this.
  4. Start an SQL client. The following steps base on Adminer but other SQL clients work similarly.

  5. Open a console and type the following to start Docker and the Adminer client.:

    docker run -p 9000:8080 adminer
  6. Type in your browser:

    localhost:9000
  7. Select Enter.

  8. Select System > PostgreSQL.

    1. Enter a server name. This must be the server name specified in the Microsoft Azure portal.

    2. Enter an admin username. This must be the username specified in the Microsoft Azure portal.

    3. Enter a password. This must be the password you used when creating the database.

      You do not need to specify a database.
  9. Select Login.

  10. Select the target database.

  11. Run the following SQL script against that target database:

    create schema planet9
  12. Stop the Docker image.

  13. Select Connection Security > Enforce SSL connection.

Result

  • You have created a database schema with SQL client.