From 23ea7e44ab42bfcca3d61981ed57ffcfbf07ebc5 Mon Sep 17 00:00:00 2001 From: Jason Howell Date: Sat, 5 Aug 2017 00:06:47 -0700 Subject: [PATCH 1/5] Usability Study adjustments --- ...uickstart-create-server-database-portal.md | 66 ++++++++++++------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/articles/postgresql/quickstart-create-server-database-portal.md b/articles/postgresql/quickstart-create-server-database-portal.md index b918ed2d1cec5..01c76ca487f8d 100644 --- a/articles/postgresql/quickstart-create-server-database-portal.md +++ b/articles/postgresql/quickstart-create-server-database-portal.md @@ -82,50 +82,66 @@ The Azure Database for PostgreSQL service creates a firewall at the server-level > Azure PostgreSQL server communicates over port 5432. If you are trying to connect from within a corporate network, outbound traffic over port 5432 may not be allowed by your network's firewall. If so, you will not be able to connect to your Azure SQL Database server unless your IT department opens port 5432. > - ## Get the connection information -When we created our Azure Database for PostgreSQL server, the default **postgres** database also gets created. To connect to your database server, you need to provide host information and access credentials. - -1. From the left-hand menu in Azure portal, click **All resources** and search for the server you just created **mypgserver-20170401**. +When we created our Azure Database for PostgreSQL server, a default database named **postgres** gets created. To connect to your database server, you need to recall the full server name and admin login credentials. You may have noted those values earlier in the quick start article. In case you did not, easily find the server name and login information from the server Overview page in the Azure portal. - ![Azure Database for PostgreSQL - Search for server ](./media/quickstart-create-database-portal/4-locate.png) - -2. Click the server name **mypgserver-20170401**. -3. Select the server's **Overview** page. Make a note of the **Server name** and **Server admin login name**. +1. Open your server's **Overview** page. Make a note of the **Server name** and **Server admin login name**. + Hover your cursor over each field, and the copy icon appears to the right of the text. Click the copy icon as needed to copy the values. ![Azure Database for PostgreSQL - Server Admin Login](./media/quickstart-create-database-portal/6-server-name.png) ## Connect to PostgreSQL database using psql in Cloud Shell -Let's now use the psql command-line utility to connect to the Azure Database for PostgreSQL server. +There are a number of applications you can use to connect to your Azure Database for PostgreSQL server. Let's first use the psql command-line utility to illustrate how to connect to the server. You can use a web browser and the Azure Cloud Shell as described here without the need to install any additional software. If you have the psql utility installed locally on your own machine, you can connect from there as well. + 1. Launch the Azure Cloud Shell via the terminal icon on the top navigation pane. ![Azure Database for PostgreSQL - Azure Cloud Shell terminal icon](./media/quickstart-create-database-portal/7-cloud-console.png) -2. The Azure Cloud Shell opens in your browser, enabling you to type bash commands. +2. The Azure Cloud Shell opens in your browser, enabling you to type bash shell commands. ![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 will 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. + +Now you have connected to the Azure Database for PostgreSQL and created a blank user database. You can close the Azure Cloud Shell, and continue to the next section to connect using another common tool pgAdmin. ## Connect to PostgreSQL database using pgAdmin From f60365859aa63d05108e15140e754cd4c5d4da19 Mon Sep 17 00:00:00 2001 From: Jason Howell Date: Sat, 5 Aug 2017 00:15:45 -0700 Subject: [PATCH 2/5] Usability Study adjustments --- .../quickstart-create-server-database-portal.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/articles/postgresql/quickstart-create-server-database-portal.md b/articles/postgresql/quickstart-create-server-database-portal.md index 01c76ca487f8d..b7d73e24bf788 100644 --- a/articles/postgresql/quickstart-create-server-database-portal.md +++ b/articles/postgresql/quickstart-create-server-database-portal.md @@ -38,7 +38,7 @@ Follow these steps to create an Azure Database for PostgreSQL server: Server name |*mypgserver-20170401*|Choose a unique name that identifies your Azure Database for PostgreSQL server. The domain name *postgres.database.azure.com* is appended to the server name you provide for applications to connect to. The server name can contain only lowercase letters, numbers, and the hyphen (-) character, and it must contain from 3 through 63 characters. Subscription|*Your subscription*|The Azure subscription that you want to use for your server. If you have multiple subscriptions, choose the appropriate subscription in which the resource is billed for. Resource Group|*myresourcegroup*| You may make a new resource group name, or use an existing one from your subscription. - Server admin login name |*Choose the latest version*| Choose the latest version unless you have specific requirements. + Server admin login |*mylogin*| Make your own login account that to be used when connecting to the server. The admin login name cannot be 'azure_superuser', 'azure_pg_admin', 'admin', 'administrator', 'root', 'guest', or 'public', and cannot start with 'pg_'. Password |*Your choice* | Create a new password for the server admin account. Must contain from 8 to 128 characters. Your password must contain characters from three of the following categories – English uppercase letters, English lowercase letters, numbers (0-9), and non-alphanumeric characters (!, $, #, %, etc.). Location|*The region closest to your users*| Choose the location that's closest to your users. PostgreSQL Version|*Choose the latest version*| Choose the latest version unless you have specific requirements. @@ -121,7 +121,7 @@ There are a number of applications you can use to connect to your Azure Database 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 will create your own database. + 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. @@ -139,9 +139,9 @@ There are a number of applications you can use to connect to your Azure Database \c mypgsqldb ``` -6. Type \q and then press ENTER to quit psql. +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. You can close the Azure Cloud Shell, and continue to the next section to connect using another common tool pgAdmin. +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 From aefd3e91c072184aff0cd6037d70448ee34bf84b Mon Sep 17 00:00:00 2001 From: Jason Howell Date: Sat, 5 Aug 2017 00:19:55 -0700 Subject: [PATCH 3/5] Usability Study adjustments --- .../quickstart-create-server-database-portal.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/articles/postgresql/quickstart-create-server-database-portal.md b/articles/postgresql/quickstart-create-server-database-portal.md index b7d73e24bf788..5ee64f5314a17 100644 --- a/articles/postgresql/quickstart-create-server-database-portal.md +++ b/articles/postgresql/quickstart-create-server-database-portal.md @@ -110,7 +110,7 @@ There are a number of applications you can use to connect to your Azure Database psql --host= --port= --username= --dbname= ``` - For example, the following command connects to an example server + 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 @@ -118,10 +118,10 @@ There are a number of applications you can use to connect to your Azure Database 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. + --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. From 8178a595a427f339935867276a98505ff15d874f Mon Sep 17 00:00:00 2001 From: Jason Howell Date: Sat, 5 Aug 2017 00:30:16 -0700 Subject: [PATCH 4/5] Usability Study adjustments --- ...uickstart-create-server-database-portal.md | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/articles/postgresql/quickstart-create-server-database-portal.md b/articles/postgresql/quickstart-create-server-database-portal.md index 5ee64f5314a17..c64f565ef3c4d 100644 --- a/articles/postgresql/quickstart-create-server-database-portal.md +++ b/articles/postgresql/quickstart-create-server-database-portal.md @@ -103,43 +103,25 @@ 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 a database in your Azure Database for PostgreSQL server by typing the psql command line at the green prompt. +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= + ``` - 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= - ``` + 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. - 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; - ``` + ```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; +``` 5. At the prompt, execute the following command to switch connection to the newly created database **mypgsqldb**. - ```bash - \c mypgsqldb - ``` - -6. Type \q and then press ENTER to quit psql. You can close the Azure Cloud Shell. +```bash +\c mypgsqldb +``` 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. From 9740b20e15c5bd8790ecfe78dcb669a04d49bada Mon Sep 17 00:00:00 2001 From: Jason Howell Date: Sat, 5 Aug 2017 00:32:43 -0700 Subject: [PATCH 5/5] Usability Study adjustments --- articles/postgresql/quickstart-create-server-database-portal.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/articles/postgresql/quickstart-create-server-database-portal.md b/articles/postgresql/quickstart-create-server-database-portal.md index c64f565ef3c4d..5934f2dfe6719 100644 --- a/articles/postgresql/quickstart-create-server-database-portal.md +++ b/articles/postgresql/quickstart-create-server-database-portal.md @@ -123,8 +123,6 @@ CREATE DATABASE mypgsqldb; \c mypgsqldb ``` -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 To connect to Azure PostgreSQL server using the GUI tool _pgAdmin_