OPERATING SYSTEMSOS Linux

PostgreSQL Installation on Ubuntu

This video discusses how to install PostgreSQL on an Ubuntu 21.04 machine.

0:00 Introduction
0:20 Open Terminal
0:22 Update Packages
0:38 Install PostgreSQL Package
1:03 Login as Postgres User
1:15 Login to PSQL Database
1:29 Create User Database
2:30 Create User Role
3:47 Grant User Permissions
4:13 Create Stock and Crypto Database

#databases
#postgresql
#ubuntu

source

ubuntu

9 thoughts on “PostgreSQL Installation on Ubuntu

  • never forget to use semi columns

  • Automagically. You will go to heaven man.

  • why keep the "postgres" user as privileged user. the whole idea is to create another user rather than default for security reasons

  • Great explanation! Unfortunately, when I install it and run psql I get this error – psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory

    Is the server running locally and accepting connections on that socket?

    Do you have any idea how to get past this? I've tried removing postgres completely and re-installing but I still get the error. Thanks! 🙂

  • This is awesome! Thanks very much! Would you recommend that each database has a separate user? And if so, should that user be created in the normal way? Should it have a home directory, etc etc? Is there a postgres user which is separate to the linux user? Or are they the same thing?

Comments are closed.