Database Reference
In-Depth Information
The pg:credentials command
The pg:credentials command supplies access credentials to the database. This com-
mand expects you to provide the database URL so that you can get the credentials. The
string and connection URL are provided.
$ heroku pg:credentials DATABASE_URL --app your-app-name
Connection info string:
"dbname=dcumcl8ngtuvm
host=ec2-54-225-168-181.compute-1.amazonaws.com port=5432
user=tzsbkrytsagtxv password=t6W3sUiGL4FebFF6oCqsUs4PeV
sslmode=require"
Connection URL:
postgres://tzsbkrytsagtxv:t6W3sUiGL4FebFF6oCqsUs4PeV@ec2-54-225-168-181.compute-1.amazonaws.com:5432/
dcumcl8ngtuvm
In some situations, you may need to change the access credentials, you can do this by
adding the --reset parameter, and then a new username and password will be generated
for the database connection.
$ heroku pg:credentials DATABASE_URL --reset --app
your-app-name
Resetting credentials for HEROKU_POSTGRESQL_[COLOR]_URL
(DATABASE_URL)... done
Promoting HEROKU_POSTGRESQL_[COLOR]_URL (DATABASE_URL)...
done
Finally, you can enter the pg:credentials command again to get the new connection
credentials:
$ heroku pg:credentials DATABASE_URL --app your-app-name
Connection info string:
"dbname=dcumcl8ngtuvm
host=ec2-54-225-168-181.compute-1.amazonaws.com port=5432
user=fodmwtkpudycuq password=wU-H4j2eMhjYUJk7M61FvSgl33
sslmode=require"
Connection URL:
postgres://fodmwtkpudycuq:wU-H4j2eMhjYUJk7M61FvSgl33@ec2-54-225-168-181.compute-1.amazonaws.com:5432/
dcumcl8ngtuvm
Search WWH ::




Custom Search