DEV Community

Maria Campbell
Maria Campbell

Posted on • Edited on

4 1

Installing pgAdmin Only after installing PostgreSQL with Homebrew

pgAdmin

This post was first published on my developer blog on June 15, 2018.

Update June 17, 2018: I revisited this issue just now and the set up really is easy. I will be writing a post on this and will link it to here. I much prefer using Homebrew, especially for local development, but I also like having the ability to use a GUI. This set set up just makes life so much easier if you want to push your local repo to remotes such as Github! To view my post entitled Installing pgAdmin Only after installing PostgreSQL with Homebrew Part 2 here, please visit Installing pgAdmin Only after installing PostgreSQL with Homebrew Part 2.

I recently started to learn PostgreSQL, and installed it on my Mac High Sierra with Homebrew. Today, I decided to delve much deeper into it and found a couple of interesting courses on it on Udemy (my course at NYCDA was severely lacking). I hadn’t installed pgAdmin with Homebrew previously because it is severely outdated, but decided I should give it a try on the pgAdmin website. I installed it and tried to log in. I received the message that the role postgres was missing, and I could not log in. That is because I had chosen to use my computer shortname instead. I decided to investigate the matter.

After some searching, I came up with the following from Stackoverflow:

psql: FATAL: role “postgres” does not exist

The part that worked for me, and should for anyone else in a similar situation, is the following in the thread:

@RogerLipscombe if you run brew link postgresql after the installation, there's no need to append the whole path to createuser, a simple createuser -s postgres will work great
Enter fullscreen mode Exit fullscreen mode

It is a comment there, and it worked like a charm! I went back into pgAdmin, the GUI recognized my new postgres user, and I was able to log in.

For me, using Homebrew to manage my activity in postgres was the way to go, but I also wanted to be able to go into the pgAdmin GUI and get a comprehensive overview of my database activity.

Hope this helps, and happy pgAdmining!

Related Resources:
How to uninstall postgreSQL on OSX and reinstall with Homebrew

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (1)

Collapse
 
letsbsocial1 profile image
Maria Campbell • Edited

I revisited this approach, and it really did end up easy to implement both a Homebrew postgresql install and a pgAdmin GUI. See update at the top of the post. Thanks!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay