From 6666c1c5e5c5732d3ece9bb53bed88b7171e364b Mon Sep 17 00:00:00 2001 From: Jason Howell Date: Sat, 5 Aug 2017 00:49:04 -0700 Subject: [PATCH] Usability Study adjustments --- ...uickstart-create-server-database-portal.md | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/articles/postgresql/quickstart-create-server-database-portal.md b/articles/postgresql/quickstart-create-server-database-portal.md index 5934f2dfe6719..5ee64f5314a17 100644 --- a/articles/postgresql/quickstart-create-server-database-portal.md +++ b/articles/postgresql/quickstart-create-server-database-portal.md @@ -103,25 +103,45 @@ There are a number of applications you can use to connect to your Azure Database ![Azure Database for PostgreSQL - Azure Shell Bash Prompt](./media/quickstart-create-database-portal/8-bash.png) -3. At the Cloud Shell prompt, connect to your Azure Database for PostgreSQL server by typing the psql command line at the prompt. The following format is used to connect to an Azure Database for PostgreSQL server with the [psql](https://www.postgresql.org/docs/9.6/static/app-psql.html) utility: - ```bash - psql --host= --port= --username= --dbname= - ``` +3. At the Cloud Shell prompt, connect to a database in your Azure Database for PostgreSQL server by typing the psql command line at the green prompt. - For example, the following command connects to the default database called **postgres** on your PostgreSQL server **mypgserver-20170401.postgres.database.azure.com** using access credentials. Always use port **5432** when connecting. Enter your server admin password when prompted. Please use spaces between the --switches in the command as shown, but do not use spaces between the equal signs and the parameter values. + The following format is used to connect to an Azure Database for PostgreSQL server with the [psql](https://www.postgresql.org/docs/9.6/static/app-psql.html) utility: + ```bash + psql --host= --port= --username= --dbname= + ``` - ```bash - psql --host=mypgserver-20170401.postgres.database.azure.com --port=5432 --username=mylogin@mypgserver-20170401 --dbname=postgres - ``` -4. Once you're connected to the server, create a blank database at the prompt. -```bash -CREATE DATABASE mypgsqldb; -``` + For example, the following command connects to an example server: + + ```bash + psql --host=mypgserver-20170401.postgres.database.azure.com --port=5432 --username=mylogin@mypgserver-20170401 --dbname=postgres + ``` + + psql parameter |Suggested value|Description + ---|---|--- + --host | *server name* | Specify the server name value that was used when you created the Azure Database for PostgreSQL earlier. Our example server shown is mypgserver-20170401.postgres.database.azure.com. Use the fully qualified domain name (\*.postgres.database.azure.com) as shown in the example. Follow the previous section to get the connection information if you do not remember your server name. + --port | **5432** | Always use port 5432 when connecting to Azure Database for PostgreSQL. + --username | *server admin login name* |Type in the server admin login username supplied when you created the Azure Database for PostgreSQL earlier. Follow the previous section to get the connection information if you do not remember the username. The format is *username@servername*. + --dbname | **postgres** | Use the default system generated database name *postgres* for the first connection. Later you create your own database. + + After running the psql command, with your own parameter values, you will be prompted to type the server admin password. This is the same password that you provided when you created the server. + + psql parameter |Suggested value|Description + ---|---|--- + password | *your admin password* | Note, the typed password characters will not be shown on the bash prompt. Press enter after you have typed all the characters to authenticate and connect. + +4. Once you're connected to the server, create a blank database at the prompt by typing the following command: + ```bash + CREATE DATABASE mypgsqldb; + ``` 5. At the prompt, execute the following command to switch connection to the newly created database **mypgsqldb**. -```bash -\c mypgsqldb -``` + ```bash + \c mypgsqldb + ``` + +6. Type \q and then press ENTER to quit psql. You can close the Azure Cloud Shell. + +Now you have connected to the Azure Database for PostgreSQL and created a blank user database. Continue to the next section to connect using another common tool pgAdmin. ## Connect to PostgreSQL database using pgAdmin