Stuart ONE

我有一头小毛驴,我从来也不骑……

 

Postgresql 8.0

记录一下昨天配置postgresql8.0的经过:
1. Add an apt soucelist :
deb http://sebastien.lardiere.free.fr/ ./postgresql8-i386/
2. Install the postgres 8.0
$apt-get update
$apt-get install postgresql-8.0
3. Now u can connect to postgres using:(template1 is the database name, postgres is the username)
sudo su postgres psql template1
4. Add a user of ur own:(-W means prompt for password to connect)
$sudo su postgres
$createuser username -W
(decide whether this user can add new user and create database by input y/n to the questions)
$exit
5. Now u can login with ur newly created username and password using:
$psql -U username -h localhost -d dbname
(then u should input the password that u set when u created this user)
6. Configuration File:
/etc/postgresql/8.0/main/pg_hba.conf
7. Postgres commands:
\h --help with SQL commands
\? --help with psql commands
\q --quit
\c dbname --connect to new database
\d{t|i|s|v|S} --list tables/indexes/sequences/views/system tables (add "+" for more detail)
\du --list users
\l --list all databases(add "+" for more detail)

posted on 2005-11-08 13:27 Stuart 阅读(196) 评论(0)  编辑  收藏 所属分类: DataBase


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

公告

常用链接

留言簿(3)

随笔分类

随笔档案

文章分类

相册

BlogRoll

Tech websites

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜