- 論壇徽章:
- 0
|
ubuntu 上面 安裝了 PG 8.3
我按照這個link給的步驟 http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804
$ sudo su postgres -c psql template1
template1=# ALTER USER postgres WITH PASSWORD 'password';
template1=# \q
That alters the password for within the database, now we need to do the same for the unix user ‘postgres’:
$ sudo passwd -d postgres
$ sudo su postgres -c passwd
Now enter the same password that you used previously.
Then, from here on in we can use both pgAdmin and command-line access (as the postgres user) to run the database server. But before you jump into pgAdmin we should set-up the PostgreSQL admin pack that enables better logging and monitoring within pgAdmin. Run the following at the command-line:
$ sudo su postgres -c psql < /usr/share/postgresql/8.3/contrib/adminpack.sql
后面的configure我沒有作,F(xiàn)在的問題是我是不是只有一個叫postgres的user,我想用他login怎么作呢? 我是必須讓Linux的login 變成 postgres,才能login?
ubuntu:~$ su - postgres
Password:
Added user postgres.
postgres@ubuntu:~$ psql -U postgres
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=# create database second_database;
CREATE DATABASE
問題1,我怎么能知道我有多少DATABASE 了? mySQL 用 show DATABASES, PG 里面什么命令能作,我查8.3的manual也沒找到。
問題2,如果我不想用postgres去login,比如我想用khandielas這個user id, 那么是不是我必須要在Linux上面有個用戶名叫 khandielas。登入PG,一定要用同樣的Linux 和 PG 用戶名?
第一次用PG的 菜鳥, 十分感謝大伙的幫助
另外我現(xiàn)在想作個免費的hospital information system, 不想用mysql因為醫(yī)院對速度要求不高?紤]到以后的功能拓展,PG 應(yīng)該是最好的。如果哪位PG高手有興趣,愿意出點力的話,請聯(lián)系我 free.his.cn@gmail.com
現(xiàn)在國內(nèi)主流醫(yī)院系統(tǒng)的都是用SQL server 和 oracle。
[ 本帖最后由 khandielas 于 2009-5-17 12:29 編輯 ] |
|