From cc36362f1b89433b66a7c4768da4738ef6227b63 Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Wed, 2 Dec 2015 10:29:48 -0800 Subject: [PATCH] documentation: clarify db permissions in getting started doc In the 'getting started' doc create a user and database for dex to clarify that the user needs permissions to create databases, but dex does not. closes #127 --- Documentation/getting-started.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/getting-started.md b/Documentation/getting-started.md index 99caa97a..679959ac 100644 --- a/Documentation/getting-started.md +++ b/Documentation/getting-started.md @@ -25,11 +25,19 @@ In addition, if you wish to try out authenticating against Google's OIDC backend # Create Database -`createdb dex_db` +On the PostgreSQL server, login as a user with appropriate permissions and create a database and user for dex to use. These can be named arbitrarily, but are called `dex_db` and `dex`, respectively, in this example. -Let's store the connection string in a shell variable: +```sql +CREATE DATABASE dex_db; +CREATE USER dex WITH PASSWORD 'dex_pass'; +GRANT ALL PRIVILEGES ON DATABASE dex_db TO dex; +``` -`DEX_DB_URL=postgres://localhost/dex_db?sslmode=disable` +Store the [connection string](http://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING) for the dex database in an environment variable: + +``` +DEX_DB_URL=postgres://dex:dex_pass@localhost/dex_db?sslmode=disable +``` # Building