close
PostgreSQL的使用
資料庫系統上一開始都會擁有一個超級使用者,在PostgreSQL上的超級使用者為postgres。
你會發現postgres 使用者的家在 /var/lib/pgsql 目錄,目錄內 data 包涵了所有 postgresql 所有需要用到的檔案內容。
切換使用者到postgres
su - postgres
出現-bash-4.1$
登入資料庫的格式
(psql [資料庫名稱])
範例1:
psql
postgres=#
範例2:
psql mydb
mydb=#
範例3:
psql mydb 使用者帳號
輸入帳戶密碼:
mydb=#
全站熱搜