Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments for Installing PostgreSQL without Root #819

Open
phinjensen opened this issue Nov 11, 2017 · 10 comments
Open

Comments for Installing PostgreSQL without Root #819

phinjensen opened this issue Nov 11, 2017 · 10 comments

Comments

@phinjensen
Copy link
Contributor

phinjensen commented Nov 11, 2017

Comments for https://www.endpointdev.com/blog/2013/06/installing-postgresql-without-root/
By Szymon Lipiński

To enter a comment:

  1. Log in to GitHub
  2. Leave a comment on this issue.
@phinjensen
Copy link
Contributor Author

original author: Greg Smith
date: 2013-06-12T11:27:04-04:00

Note that if all you want is to have a temporary PostgreSQL installation from source in your home directory, you can do that using peg in only 3 easy steps: create a working area, init and build. It manages details like compiling and making directories to hold source code, binaries, and a data directory.

@phinjensen
Copy link
Contributor Author

original author: tuxflo
date: 2013-09-25T07:25:52-04:00

Hey! Thanks for the tutorial, worked like a charm :)

Do you know if it is possible to connect from a php script to this local postgres installation?
How does a connection_string looks like if I_m trying to do a pg_connect from that php script?
Greetings,
Flo

@phinjensen
Copy link
Contributor Author

original author: Bert Chang
date: 2014-07-29T10:58:58-04:00

Thanks. This really helps and it's really useful.

@b-camacho
Copy link

Worked like a charm, saved me a lot of time. Thanks.

@kanihal
Copy link

kanihal commented Dec 24, 2018

Thanks for the tutorial. It was Very helpful.

@heckur
Copy link

heckur commented Apr 4, 2019

I followed the steps and everything worked fine except for the last part, my system user was not created in the db:

bin/psql -U my_linux_user postgres
psql: FATAL:  role "my_linux_user" does not exist

and it won't let me create it:

./bin/createuser --interactive
Enter name of role to add: my_linux_user
Shall the new role be a superuser? (y/n) y
createuser: could not connect to database postgres: FATAL:  role "my_linux_user" does not exist

since I don't have root privileges, and the user postgres does not exist in the system, I don't know in what other way I can create my role, any ideas?

@machack666
Copy link

Hi, does it work using when adding the -U postgres flag?

@heckur
Copy link

heckur commented Apr 4, 2019

Hi, does it work using when adding the -U postgres flag?

No, the postgres user was not created either so I get the same error:

bin/psql -U postgres postgres
psql: FATAL:  role "postgres" does not exist

@heckur
Copy link

heckur commented Apr 8, 2019

It was my fault, incorrect postgres binaries (initdb, createuser...) were in my LD_LIBRARY_PATH, so they were trying to connect me to a faulty installation I guess, once I removed them and added the correct ones, I was able to connect to a db that already had my system user created.

@madhu1agrawal
Copy link

I am getting the error "Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? How can I resolve this? This happens when run postgres/bin/psql -U postgres.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants