1 Replies - 2515 Views - Last Post: 02 November 2012 - 06:40 PM Rate Topic: -----

#1 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,604
  • Joined: 20-January 09

PSQL Role Root Does Not Exist

Posted 02 November 2012 - 10:28 AM

I want to log into PSQL as the admin, much like you would with Mysql where you log in with mysql -u root -p.

But I keep getting the error when running psql -l: psql: FATAL: role "root" does not exist

I have looked into this and found that psql by default looks at the current user and uses that as the user trying to run the command. But even doing something like psql -u postgres -l or psql -l -u postgres comes back with syntax errors.

I am just wanting to get root access and it seems like the only way to do this is to be the postgres user, how do I force psql to use that user?

This post has been edited by gregwhitworth: 02 November 2012 - 10:29 AM


Is This A Good Question/Topic? 0
  • +

Replies To: PSQL Role Root Does Not Exist

#2 AdaHacker  Icon User is offline

  • Resident Curmudgeon

Reputation: 452
  • View blog
  • Posts: 811
  • Joined: 17-June 08

Re: PSQL Role Root Does Not Exist

Posted 02 November 2012 - 06:39 PM

Check the documentation. The option is -U username - that's a capital "U". Options are case-sensitive. There is no lower-case -u option, which could explain your errors.

This post has been edited by AdaHacker: 02 November 2012 - 06:40 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1