pgsql-create-db-user:postgresql_create_database_user
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| pgsql-create-db-user:postgresql_create_database_user [2018/09/11 09:23] – créée ronan | pgsql-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 3: | Ligne 3: | ||
| ===== Autoriser les connections authentifiées en local pour posgresql ===== | ===== Autoriser les connections authentifiées en local pour posgresql ===== | ||
| - | # cp -a / | + | <code bash> |
| - | # sed -i " | + | |
| - | # service postgresql stop | + | |
| - | # service postgresql start | + | |
| - | | + | export |
| - | PGSQL_USERNAME=hordeu | + | export |
| - | PGSQL_USERPWD=password | + | export |
| - | /bin/su postgres --command "/ | + | |
| - | /bin/su postgres --command "/ | + | apt install postgresql |
| - | /bin/su postgres --command "/ | + | cp -a / |
| - | /bin/su postgres --command "/ | + | sed -i " |
| + | service postgresql stop | ||
| + | service postgresql start | ||
| + | |||
| + | |||
| + | cd / | ||
| + | /bin/su postgres --command "/ | ||
| + | /bin/su postgres --command "/ | ||
| + | /bin/su postgres --command "/ | ||
| + | /bin/su postgres --command "/ | ||
| + | |||
| + | </ | ||
| ===== Test ===== | ===== Test ===== | ||
| - | # /bin/su postgres --command "psql --command=\" | + | <code bash> |
| + | /bin/su postgres --command "psql --command=\" | ||
| + | </ | ||
| ===== MEMO ===== | ===== MEMO ===== | ||
| Ligne 32: | Ligne 42: | ||
| ===== DROP DB ===== | ===== DROP DB ===== | ||
| - | # su - postgres | + | <code bash> |
| - | # | + | su - postgres |
| - | | + | psql -U postgres |
| - | | + | \l |
| - | | + | DROP DATABASE xys; |
| + | \q | ||
| + | </ | ||
| + | |||
| + | ===== Cheat Sheets ===== | ||
| + | * http:// | ||
| + | * https:// | ||
pgsql-create-db-user/postgresql_create_database_user.1536657833.txt.gz · Dernière modification : 2018/09/11 09:23 de ronan