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
-
You have Docker installed. You can get it here.
Procedure
-
Open your Postgres database.
-
Click Connection Security > Add client IP.
-
Add your public IP address.
Disable Enforce SSL connection in case your SQL client does not support this. -
Start an SQL client. The following steps base on Adminer but other SQL clients work similarly.
-
Open a console and type the following to start Docker and the Adminer client.:
docker run -p 9000:8080 adminer
-
Type in your browser:
localhost:9000
-
Press Enter.
-
Click System > PostgreSQL.
-
Enter a server name. This must be the server name specified in the Azure portal.
-
Enter an admin username. This must be the username specified in the Azure portal.
-
Enter a password. This must be the password you used when creating the database.
You do not need to specify a database.
-
-
Click Login.
-
Select the target database.
-
Run the following SQL script against that target database:
create schema planet9
-
Stop the Docker image.
-
Click Connection Security > Enforce SSL connection.