PostgreSQL
Версія від 20:56, 10 квітня 2010, створена 94.248.119.71 (обговорення) (Created page with '== Встановлення == # yum install postgresql postgresql-server # chkconfig postgresql on # service postgresql start -A RH-Firewall-1-INPUT -m state --state NEW -...')
Встановлення
# yum install postgresql postgresql-server # chkconfig postgresql on # service postgresql start
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
Вхід у консоль
# su - postgres $ psql template1
or
$ psql -d template1 -U postgres
Створення користувача
# adduser andrew # passwd andrew # su - postgres $ psql template1 template1=# CREATE USER andrew WITH PASSWORD 'myPassword'; template1=# CREATE DATABASE mydb; template1=# GRANT ALL PRIVILEGES ON DATABASE mydbto andrew; template1=# \q
тестуваня
$ su - andrew $ psql -d mydb -U andrew