« PostGreSQL » : différence entre les versions
Ligne 8 : | Ligne 8 : | ||
grant all privileges on database mydb to myuser; | grant all privileges on database mydb to myuser; | ||
= Autoriser l'accès distant à un serveur Postgres = | |||
# Editer le fichier '''/etc/postgresql/postgresql.conf''' | |||
# Modifier la ligne suivante : | |||
#listen_addresses = 'localhost' # what IP address(es) to listen on; | |||
# comma-separated list of addresses; | |||
# defaults to 'localhost'; use '*' for all | |||
# (change requires restart) | |||
listen_addresses = '*' | |||
# Editer le fichier '''/etc/postgresql/pg_hba.conf''' | |||
# Modifier la ligne suivante : | |||
host all all 0.0.0.0/24 trust | |||
= Changer l'encodage d'un template = | = Changer l'encodage d'un template = | ||
First, we need to drop template1. Templates can’t be dropped, so we first modify it so t’s an ordinary database: | First, we need to drop template1. Templates can’t be dropped, so we first modify it so t’s an ordinary database: |