I tried to start my postgresql database after reinstalling WSL, I started the server successfully
nnaemekaxjohn@Nnaemeka:/mnt/c/Users/HP/documents/the_age_project/postgresql-11.17$ bin/pg_ctl -D demo -l logfile start
waiting for server to start....... done
server started
nnaemekaxjohn@Nnaemeka:/mnt/c/Users/HP/documents/the_age_project/postgresql-11.17$ bin/psql --port=5430 demo
psql: FATAL: role "nnaemekaxjohn" does not exist
But when I try to connect to my demo
database I get the Fatal error, I suspect this is as a result of changing my ubuntu username during WSL reinstallation.
How can this error be fixed? I’ve gone through many answers on Stackoverflow and none seemed to help as they were not running Postgres on source code.