When I tried to follow the "alternative server setup" as detailed here: PostgresSQL, I got the error ERROR: role "$user" does not exist when I ran postgres=# \password $USER and entered my new password. The instructions are very simple, and I followed everything to the letter. Would anyone know what's wrong with my setup?
1 Answer
It is always best to copy/paste the command and error message so we might check your syntax.
Two thoughts - "$USER" is a variable, you replace it with the user name you wish to use. Also $user is not the same as $USER.
So ...
sudo -u postgres createuser --superuser your_user
sudo -u postgres psqlYou should not have a postgres prompt, again change "$USER" to the actual user name you wish to use ...
postgres=# \password your_userand on ...
1