Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 732 Bytes

File metadata and controls

38 lines (29 loc) · 732 Bytes

Test for successful connection to server's database

  1. Clone the repository
git clone https://github.com/haugmarkus/HealthInformaticsDatabaseConnectionTest.git
  1. Populate .env file with your credentials
DB_USERNAME=username
DB_PASSWORD=pw
DB_PORT=65432
DB_SERVER=localhost
DB_NAME=maitt
  1. Initiate ssh connection
ssh -L 65432:localhost:5432 username@server_name
  1. Run the code in test.R
Rscript test.R
  1. If succesful you should see:
> test_dbi_connection()
[1] "Connection successful with DBI"
> test_database_connector_connection()
Connecting using PostgreSQL driver
[1] "Connection successful with DatabaseConnector"