Saturday, March 8, 2008

Changing user password in postgres

1. [root@localhost ~]# psql -d coba -u yourname
psql: warning: extra command-line argument "hastuti" ignored
psql: Warning: The -u option is deprecated. Use -U.
User name: hastuti
Password for user :
Welcome to psql 8.2.3, 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

coba=>

2. use ALTER USER
coba=> alter user yourname with password 'newpasswd';

No comments:

Post a Comment