How To Install PostgreSQL on Ubuntu 20.04

preview_player
Показать описание


In this video we will see how to install PostgreSQL on Ubuntu 20.04

1. sudo apt update
2. sudo apt install postgresql postgresql-contrib
3. sudo -i -u postgres
4. psql
5. \q (to be run on postgres command line)
6. exit
7. sudo -u postgres psql
8. \q
9. createuser --interactive
10. sudo -u postgres createuser --interactive
11. createdb sammy
12. sudo -u postgres createdb sammy
13. sudo adduser sammy
14. sudo -i -u sammy
psql
15. sudo -u sammy psql
16. psql -d postgres
17. \conninfo
Рекомендации по теме
Комментарии
Автор

I get following error after entering "psql". How to fix it?

psql: error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket

taivox
Автор

I wish you could have also provided the link of that article, however it was good and a help full video

ChandanKumar-ofje
Автор

Please upload a video on the. Installation of version 11

Vikashkumar-hmvq
Автор

i am getting this error


createuser: error: could not connect to database template1: FATAL: role "root" does not exist

suryaashish
Автор

In this you haven't configure password, then what will be the default password to connect a database in the code?

pallaviiii