vim /etc/postgresql/x.x/main/pg_hba.conf
commenter
# “local” is for Unix domain socket connections only
#local all all peer
ajouter
local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
service postgresql restart
sudo -i -u postgres
createuser -P –interactive <nom_utilisateur>
sudo -i -u postgres ## import
pg_dump <nom_de_la_base> > nom_de_la_base.pgdump ## export
cat nom_de_la_base.pgdump | psql -d nom_de_la_base
su - postgres
psql
\c <USER>
GRANT ALL
ON ALL TABLES IN SCHEMA public
TO <USER>;