![]() ![]() Reading further I see some using initdb (credit to the final update in this Q) rather than start so I thought I'd give that a go. Let try that then $ sudo -u postgres export PGDATA="/Library/PostgreSQL/12/data/" I have it set on my user, so I guess it isn't set for the postgres user. Pg_ctl: no database directory specified and environment variable PGDATA unset Trying something else, omitting the -D as I might be overcomplicating things. perhaps I need to specify it's path in the command $ sudo -u postgres /Library/PostgreSQL/12/bin/pg_ctl -D /Library/PostgreSQL/12/data/ start ![]() The program "postgres" is needed by pg_ctl but was not found in the could not identify current directory: Permission denied $ sudo -u postgres pg_ctl -D /Library/PostgreSQL/12/data/ start Now, naturally trying to start it back up again with The website wasn't working, as was excepted. Stopping DB $ sudo -u postgres pg_ctl -D /Library/PostgreSQL/12/data/ stopĬould not identify current directory: Permission denied Tl dr: What is the correct way/command to start a DB, on OSX, not using homebrew, and with it's default settings/directory structure?Īfter much reading on many websites I found the way to stop the server, a way which worked for me personally – not using Homebrew and on OSX So I wanted to learn how to start/stop/restart the server at the start of the project so I was better equipped to manage it later down the line. ![]() I use PgAdmin 4 to visualise the database, and my literal understanding of "shut down server" on that application was it shut down the database, however it does not. I am not from a PostgreSQL background and wanted to use it for a project I am currently working on as it was the recommended DB for what I am using. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |