mirror of
https://github.com/TrentSPalmer/flask_photo_scaling_app.git
synced 2024-12-22 02:32:50 -08:00
update database README
This commit is contained in:
parent
e20e1529af
commit
37189c1322
@ -13,12 +13,24 @@ but you probably want the default format which is *aligned*
|
|||||||
`\password <application_unix_user>`
|
`\password <application_unix_user>`
|
||||||
`GRANT ALL PRIVILEGES ON DATABASE <application_database_name> TO <application_unix_user>;`
|
`GRANT ALL PRIVILEGES ON DATABASE <application_database_name> TO <application_unix_user>;`
|
||||||
|
|
||||||
|
## allow app user in postgresql
|
||||||
|
|
||||||
|
add line **above** `local all all peer`
|
||||||
|
|
||||||
|
```conf
|
||||||
|
# /etc/postgresql/11/main/pg_hba.conf
|
||||||
|
local <application_unix_user> <application_unix_user> md5
|
||||||
|
local all all peer
|
||||||
|
```
|
||||||
|
|
||||||
|
and then restart postgresql `systemctl restart postgresql`
|
||||||
|
|
||||||
## change database
|
## change database
|
||||||
|
|
||||||
`\c <application_database_name>`
|
`\c <application_database_name>`
|
||||||
|
|
||||||
## create the database tables
|
## create the database tables
|
||||||
`sudo -u postgres psql < create_database_tables.sql`
|
`sudo -u '<application_unix_user>' psql < create_database_tables.sql`
|
||||||
|
|
||||||
## sanity check
|
## sanity check
|
||||||
In order to be able to register, login to the psql command line
|
In order to be able to register, login to the psql command line
|
||||||
|
Loading…
Reference in New Issue
Block a user