Changes between Version 1 and Version 2 of jazz/PostgreSQL


Ignore:
Timestamp:
Jan 11, 2018, 11:56:00 AM (6 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/PostgreSQL

    v1 v2  
    22
    33[[PageOutline]]
     4
     5* psql 指令說明 - https://www.postgresql.org/docs/current/static/app-psql.html
    46
    57== 修改管理者密碼 ==
     
    4648}}}
    4749
     50== 允許使用者可以管理指定資料庫 ==
     51
     52{{{
     53~$ sudo su - postgres
     54-bash-4.2$ psql -d postgres ### 使用 postgres 資料庫
     55postgres=# ALTER USER 使用者名稱 WITH ENCRYPTED PASSWORD '密碼';
     56postgres=# GRANT ALL PRIVILEDGES ON DATABASE 資料庫名稱 TO 使用者名稱;
     57}}}
     58
     59== 新增使用者為管理者 ==
     60
     61{{{
     62~$ sudo su - postgres
     63-bash-4.2$ psql -d postgres ### 使用 postgres 資料庫
     64postgres=# ALTER USER 使用者名稱 WITH SUPERUSER;
     65}}}