I want to create a database in pgAdmin4 but a corresponding item in the menu is grayed out.

I also tried to create a role, thinking that I might be lacking permissions to create database in first place, but it is also grayed out.

enter image description here

When pgAdmin4 loads it asks for master password, which I enter. What else am I expected to do?

  • Maybe you are not logged in with the superuser account. What happens if you run create role manually? – a_horse_with_no_name Apr 12 '20 at 12:09
  • You mean in pgAdmin4? How do I log in with superuser account there? The only thing it prompts for is master user password. I actually ended up going and creating DB from CLI. – jayarjo Apr 12 '20 at 12:46
  • I don't use pgAdmin so I have no idea what a "master user" is supposed to be. – a_horse_with_no_name Apr 12 '20 at 12:54

This works for me if the user I am logged in as has either the superuser attribute, or the createrole and/or createdb attribute.

When you create a server (probably a poor wording, you are't initializing a server, but connecting to an existing one), pgAdmin4 definitely asks you for more information than just the master password. Like what user you want to connect as.

If you want to connect as different users at different times, you need to "create server..." for each one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.