訪問postgresql的方法

小編給大家分享一下訪問postgresql的方法,相信大部分人都還不怎么了解,因此分享這邊文章給大家學(xué)習(xí),希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去學(xué)習(xí)方法吧!

公司主營業(yè)務(wù):成都網(wǎng)站建設(shè)、做網(wǎng)站、移動(dòng)網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。成都創(chuàng)新互聯(lián)是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來驚喜。成都創(chuàng)新互聯(lián)推出龍港免費(fèi)做網(wǎng)站回饋大家。

postgresql啟動(dòng)數(shù)據(jù)庫服務(wù)器(posgres用戶):

[postgres@localhost bin]$ postgres -D /opt/postgresql/data/ > /opt/postgresql/log/pg_server.log 2>&1 &
[1] 4508

當(dāng)然如果設(shè)置了環(huán)境變量

PGDATA=/opt/postgresql/data
export PGDATA

后,可使用pg_ctl工具進(jìn)行啟動(dòng):

[postgres@localhost log]$ pg_ctl start -l /opt/postgresql/log/pg_server.log
pg_ctl: another server might be running; trying to start server anyway
pg_ctl: could not start server
Examine the log output.
[postgres@localhost log]$

當(dāng)然,最簡的啟動(dòng)方式是:

[postgres@localhost ~]$ pg_ctl start
server starting
[postgres@localhost ~]$ LOG:  database system was shut down at 2011-07-09 13:58:00 CST
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections

 如果要在操作系統(tǒng)啟動(dòng)時(shí)就啟動(dòng)PG,可以在/etc/rc.d/rc.local 文件中加以下語句:

/opt/postgresql/bin/pg_ctl start -l /opt/postgresql/log/pg_server.log -D /opt/postgresql/data

以上是訪問postgresql的方法的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

網(wǎng)站名稱:訪問postgresql的方法
網(wǎng)站路徑:http://muchs.cn/article0/gceeoo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作、網(wǎng)站營銷面包屑導(dǎo)航、網(wǎng)站維護(hù)、網(wǎng)站設(shè)計(jì)公司建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

微信小程序開發(fā)