How to use your database credential files

We have provided you with a credentials package with all of the usernames and passwords for your MedStack server deployment. For the database credentials, the database username is in the file name, and the password is in the file.

Postgres example

If you have a postgres database, your credentials package includes a folder `postgres`. Inside will be a file or files with a name such as `example.medstack.net-example_admin.pass` and `example.medstack.net-example_app.pass`. Here is an example of how to use the file:

  • Hostname: example.medstack.net (file name, before the hyphen). This is the server which the database runs on.
  • Username: example_admin (file name, after the hyphen).
  • Password: the contents of the file.

To connect using the command line postgres client to a database on localhost:

deploy@example:~$ psql --username=example_admin --password postgres
Password for user example_admin: 
psql (9.6.6)
Type "help" for help.

postgres=#

To connect to a database on a separate host:

deploy@example:~$ psql "sslmode=require host=example-db.medstack.net user=example_admin dbname=postgres"
Password: 
psql (9.5.10, server 9.5.7)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=>

MySQL example

If you have a MySQL database, your credentials package includes a folder named for the instance, such as `example.medstack.net`. Inside is a file or files with a name such as `mysql-root.pass`. Here is an example of how to use the file:

  • Hostname: example.medstack.net (the name of the folder). This is the server which the database runs on.
  • Username: root (file name, after the hyphen).
  • Password: the contents of the file.

Still need help? Contact Us Contact Us