PostgreSQL on devweb #
For access to PostgreSQL on devweb, please see the guidance on Requesting Access.
If you have requested PostgreSQL access, you'll be given a database with the same name as your university DS username (e.g. xxy12345). You can connect from Linux (Cafe, Linux lab machines or CPU nodes - see Remote Compute) by running psql -U $username -h devweb2024.cis.strath.ac.uk $database
(where both $username and $database is your DS username).
On Windows lab machines, you can use the built-in SSH client to connect to cafe, where you'll be able to run the commands above; to do so, please launch Windows Terminal by clicking on the Start button and typing terminal and choosing the Terminal application. See Remote Compute for more information on connecting to cafe.
Changing your password #
You can change your password using using the following SQL statement (at the psql
prompt, replacing $username with your PostgreSQL username):
ALTER USER $username WITH PASSWORD 'newpassword';
Accessing PostgreSQL from home / off-campus #
In order to access PostgreSQL off-campus, you need to tunnel your connection via cafe (ssh) as follows (replacing $username with your DS username):
ssh -L 5432:devweb2024.cis.strath.ac.uk:5432 $username@cafe.cis.strath.ac.uk
You'll then by able to connect your local Postgres client or app to localhost:5432, which will be tunnelled to devweb2024 via cafe.
See Remote compute for more details.