When I write createdb mydb in the bash terminal. I write the password, but I am getting an error for a user "amodhakal". I have not set up that user, so I was wondering how I can change that user to "postgres" so I can use createdb mydb. Thank You for helping. If more clarification is needed, just let me know!
$ createdb mydb Password: Password: createdb: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "amodhakal" When I type psql, I get password for user amodhakal. Like I said, that user doesn't exist so I need to delete that user, and change it to "postgres"
psql Password for user amodhakal:
createdbtakes a-Uconnection parameter option.createdbworks. It uses the current shell user (OS account) name if you don't specify a username explicitly.libpgbased client so you can use environment variables as shown in the Environment section of thecreatedblink to set the connection parameters. In your casePGUSER. Though this will become the 'default' user for alllibpqbased clients that are the same environment, unless overridden at the command line.