psql: FATAL: "username" role not available
I am trying psql and getting an error.
$ psql psql: FATAL: "myilmaz" role not available
Then I try
$ createdb python_getting_started createdb: Unable to connect to template1 database: FATAL: "myilmaz" does not have access to the system
export DATABASE_URL=postgres://$(whoami) as indicated here and then started getting this error. I don't know if there was an error before that.
Note: I'm using Pardus 17.3, and it based Debian 9. 'myilmaz' is my username.
Edit: I tried adding my user to template1 in postgres user.
These error messages do not appear in PostgreSQL; did you freely translate them from another language?
Anyway, your problem is likely that
createdbassume a database user name identical to your current operating system user name, which is
You can specify a database user name with the
But it is probably better to login as operating system user
postgresand then run the commands, this is typically how PostgreSQL installations are set up.