← MacSELECT * FROM Shiraverse · All Nukte
Get startedSetupMac › Manual › Verify

Check your SQL setup on Mac

Five things installed. One page to check all of them, and the fixes for the six most common problems.

Jo video mein bola, yahan nukte mein likha hai.
What I said in the video, written here as key points.

▶ Watch the video

Mac › Manual › Verify

Check everything together

PostgreSQL logo
psqlPostgreSQL
📝
codeVS Code
🌿
gitGit
🖥️
pgAdmin 4connects

Ek baar sab check kar lo. One check for all of it.

You installed five things. This page checks them all, together, in one Terminal window.

Step 1

Three commands

Terminal– □ ×
~ % psql --version psql (PostgreSQL) <version> ~ % code --version 1.x.x ~ % git --version git version 2.x

Three version numbers. If one is missing, open a new window and try again.

Open a new Terminal window and run:

psql --version
code --version
git --version

All three should print a version number.

Step 2

Connect to your database

Terminal– □ ×
~ % psql -h localhost -U postgres -d practice Password for user postgres: practice=# practice=# \q

See practice=#? You are connected.

Type psql -h localhost -U postgres -d practice, enter your password and look for practice=#. Type \q to leave. Then open pgAdmin 4 from Applications and check that your server opens and shows databases.

If something goes wrong

All the fixes

brew: command not foundRun the two Homebrew Next steps lines, open a new Terminal window.
psql: command not foundbrew link --force postgresql@<version>, new Terminal window.
PostgreSQL will not startbrew services restart postgresql@<version>
role "postgres" does not existcreateuser -s postgres
pgAdmin connection refusedCheck brew services list shows postgresql started.
code: command not foundVS Code, Cmd + Shift + P, Shell Command: Install 'code' command.

Tip: always restart Terminal after installing. Ghabrana nahi.

  • brew: command not found: run the two Homebrew Next steps lines, open a new Terminal window.
  • psql: command not found: brew link --force postgresql@<version>, then a new Terminal window.
  • PostgreSQL will not start: brew services restart postgresql@<version>.
  • role "postgres" does not exist: createuser -s postgres.
  • pgAdmin connection refused: check brew services list shows postgresql started.
  • code: command not found: in VS Code, Cmd + Shift + P, run Shell Command: Install 'code' command in PATH.

Tip: always restart Terminal after installing, so PATH changes take effect.

Your turn

Everything green?

sql.theshiraverse.com

Tell me in the comments. Milte hain agli video mein. Next: load the RetailMart database.

Free SQL course and the Setup page, which maps every step. Join the WhatsApp Community, the Channel or Discord.

→ / Space next   ← back   F fullscreen   H hide bars   N notes