Outils pour utilisateurs

Outils du site


pgsql-create-db-user:postgresql_create_database_user

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
pgsql-create-db-user:postgresql_create_database_user [2019/03/25 20:21] ghussonpgsql-create-db-user:postgresql_create_database_user [2023/05/23 08:56] (Version actuelle) – [Autoriser les connections authentifiées en local pour posgresql] ghusson
Ligne 10: Ligne 10:
  
  
-cp -a /etc/postgresql/9.6/main/pg_hba.conf /etc/postgresql/9.6/main/pg_hba.conf_ +apt install postgresql 
-sed -i "s/local   all             all                                     peer/local   all             all                                     md5/g" /etc/postgresql/9.6/main/pg_hba.conf+cp -a /etc/postgresql/13/main/pg_hba.conf /etc/postgresql/13/main/pg_hba.conf_ 
 +sed -i "s/local   all             all                                     peer/local   all             all                                     md5/g" /etc/postgresql/11/main/pg_hba.conf
 service postgresql stop service postgresql stop
 service postgresql start service postgresql start
 +
  
 cd / cd /
-/bin/su postgres --command "/usr/bin/createuser --no-superuser --no-creatvi edb --no-createrole --login ${PGSQL_USERNAME}"+/bin/su postgres --command "/usr/bin/createuser --no-superuser --no-createdb --no-createrole --login ${PGSQL_USERNAME}"
 /bin/su postgres --command "/usr/bin/psql --command=\"ALTER USER ${PGSQL_USERNAME} PASSWORD '${PGSQL_USERPWD}'\"" /bin/su postgres --command "/usr/bin/psql --command=\"ALTER USER ${PGSQL_USERNAME} PASSWORD '${PGSQL_USERPWD}'\""
 /bin/su postgres --command "/usr/bin/createdb --encoding UTF8 --owner ${PGSQL_USERNAME} ${PGSQL_DB_NAME}" /bin/su postgres --command "/usr/bin/createdb --encoding UTF8 --owner ${PGSQL_USERNAME} ${PGSQL_DB_NAME}"
Ligne 47: Ligne 49:
 \q \q
 </code> </code>
 +
 +===== Cheat Sheets =====
 +  * http://www.ixany.org/docs/PostgreSQL_commandes_mysql.html
 +  * https://tomcam.github.io/postgres/
pgsql-create-db-user/postgresql_create_database_user.1553545309.txt.gz · Dernière modification : 2019/03/25 20:21 (modification externe)