Discuss Set server password in the PostgreSQL Help forum on Dev Shed. Set server password PostgreSQL Help forum discussing administration, SQL syntax, or other PostgreSQL-related topics. PostgreSQL provides enterprise level database functionality at open source prices.
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.
Posts: 71
Time spent in forums: 16 h 35 m 20 sec
Reputation Power: 3
I install postgresql with the windows installer.
I set the password for the postgres user during the installation (it asks me for one).
Is this the password for the superuser (postgres)?
A new database cluster is created too during the installation (the windows installer do this).
After that I open with pgadminIII the server and it asks me for a password and whether I want to store it or not. I give the password, what I gave during the installation and everything is fine.
But: how can I acces the server right after the installation? How can I pass this password in the console? Because I want to performe some psql commands after installation. And if I don't open the server with pgadminIII and set the password to acces to the server, the psql commands fail.
Posts: 71
Time spent in forums: 16 h 35 m 20 sec
Reputation Power: 3
I think, the problem is the following:
- when I install postgresql, I install it under a given windows user account
- at the first time I want to connect to the server (under this user), the server wants the specified password, because the actuell account isn't the postgres manager account
- but if I log in windows with the postgres account, it won't ask me for a password to connect to the server
EDIT: I deleted the pgpass.conf and now, the server asks for a password (just as expected)
now, the question is, how can I pass the password in the console?
this doesn't work:
psql -U postgres -w password -f test.sql
this doesn't too
psql -U postgres -w 'password' -f test.sql
Last edited by derstauner : February 5th, 2012 at 10:40 AM.