Changes between Initial Version and Version 1 of jazz/PostgreSQL


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

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/PostgreSQL

    v1 v1  
     1= PostgreSQL =
     2
     3[[PageOutline]]
     4
     5== 修改管理者密碼 ==
     6
     7{{{
     8~$ sudo su - postgres
     9~$ psql
     10postgres=# \password postgres
     11Enter new password:
     12Enter it again:
     13postgres=# \q
     14}}}
     15
     16== 資料庫列表 ==
     17
     18{{{
     19~$ sudo su - postgres
     20~$ psql
     21postgres=# \l
     22                                  List of databases
     23   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
     24-----------+----------+----------+-------------+-------------+-----------------------
     25 postgres  | postgres | UTF8     | zh_TW.UTF-8 | zh_TW.UTF-8 |
     26 template0 | postgres | UTF8     | zh_TW.UTF-8 | zh_TW.UTF-8 | =c/postgres          +
     27           |          |          |             |             | postgres=CTc/postgres
     28 template1 | postgres | UTF8     | zh_TW.UTF-8 | zh_TW.UTF-8 | =c/postgres          +
     29           |          |          |             |             | postgres=CTc/postgres
     30(3 rows)
     31
     32}}}
     33
     34== 新增使用者 ==
     35
     36{{{
     37~$ sudo su - postgres
     38-bash-4.2$ createuser 使用者名稱
     39}}}
     40
     41== 新增資料庫 ==
     42
     43{{{
     44~$ sudo su - postgres
     45-bash-4.2$ createdb 資料庫名稱
     46}}}
     47