pythontr.com
aptitude install postgresql python-pyscopg2
su - cd /home mkdir pgsql chmod 700 pgsql chown postgres: pgsql cd pgsql /etc/init.d/postgresql-8.3 stop cp -a /var/lib/postgresql/8.3/main/* . vim /etc/postgresql/8.3/main/postgresql.conf data_directory = '/home/pgsql' /etc/init.d/postgresql-8.3 start
su - su - postgres psql
psql içinde CREATE ROLE kullanici; ALTER ROLE kullanici WITH LOGIN ENCRYPTED PASSWORD 'parola'; CREATE DATABASE kullanici; /etc/postgresql/8.3/main/pg_hba.conf içinde local all kullanici md5
psql içinde CREATE ROLE okuyucu; ALTER ROLE okuyucu WITH LOGIN ENCRYPTED PASSWORD 'parola'; \c veritabani GRANT SELECT ON TABLE tablo TO okuyucu;
Yorumlar