I set up postgres according to the instructions for Windows 10 but every time I try to run psql
it asks for a non superuser password which I haven't created. How do I make it ask for the superuser without using psql -U postgres
command every time? Or how can I set/change a password for a non superuser? I've tried using ALTER ROLE
to change the password but get role [username] does not exist
as an error message.
By default, psql
tries to use your OS username as a database username. Presumably this role hasn't been created in your database, hence the "does not exist" error.
You can override this default by setting the PGUSER
environment variable .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.