Installing PostgreSQL under Debian and creating sample user and database

Publié le: 30 mars 2018
sur la chaîne: Javed Akhtar
143
4

Installing PostgreSQL under Debian
First update your installation with(Make sure you are logged in as root)
apt-get update

then install PostgreSQL with the command bellow
apt-get install -y postgresql libpq-dev

to make the PostgreSQL start at system start use the command bellow
systemctl start postgresql
systemctl enable postgresql

to run first time without password
sudo -u postgres psql

To create a database
CREATE DATABASE netbox;

Now create a user "Replace the quoted text with password of your choice"
CREATE USER netbox WITH PASSWORD 'Your Password Here';

Grant the new user privilege for the database
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;

to quit
\q


Sur cette page du site, vous pouvez voir la vidéo en ligne Installing PostgreSQL under Debian and creating sample user and database durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Javed Akhtar 30 mars 2018, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 143 fois et il a aimé 4 téléspectateurs. Bon visionnage!