[root@localhost ~]# su - postgres
-bash-3.2$ psql template1
Welcome to psql 8.1.11, 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
template1=# CREATE USER dndy WITH PASSWORD '200887';
CREATE ROLE
template1=# CREATE DATABASE dendy;
CREATE DATABASE
template1=# GRANT ALL PRIVILEGES ON DATABASE dendy to dndy;
GRANT
template1=# \q
-bash-3.2$ su - dndy
Password:
[dndy@localhost ~]$ psql -d dendy -U dndy
Welcome to psql 8.1.11, 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
dendy=>
dan lanjutkan lah dengan membuat tabel dan isilah data yang anda butuhkan.
No comments:
Post a Comment