pilec
November 17, 2015, 10:10pm
1
Hello there,
im trying to build up my database test on CircleCI and im stuck for more than 3 hours.
Stiuation:
id like to run on postgresql database on PHP application , but as far as i get is getting error fe_sendauth: no password supplied
because ubuntu user has not set any password.
I already tried:
by postgres command line:
creating new user and add privilegies (permission denied)
set ubuntu user some password (permissing denied)
is there any possibilities to be allowed changing own password in box? Or may I connect to postgres by socket not by TCP connection to localhost? Or is there any other way?
Thanks
levlaz
November 17, 2015, 10:11pm
2
Are you able to try these steps using sudo
?
pilec
November 17, 2015, 10:11pm
3
Hello is not permitted by database not by system, so sudo cannot helps am I right?
levlaz
November 17, 2015, 10:15pm
4
So I think that the default user ubuntu
is created as a superuser, is that who you are connecting to the DB with?
Also:
Is this a public project?
Which version of PSQL are you using?
pilec
November 17, 2015, 11:11pm
5
Aah, im little bit further, thanks for giving right question
problem was here:
psql -c 'ALTER USER ubuntu with password 'test';' -U ubuntu;
ERROR: syntax error at or near "test"
but now im in funny situation.
if I alter user password, postgre says ALTER
but i can still log in in ssh like psql -U ubuntu
without asking any password
If i want to create new user like this:
- psql -c "CREATE user test with password 'test'";
- psql -c "GRANT ALL PRIVILEGES ON DATABASE circle_test to test;";
I can loggin in ssh with psql -U test
and providing password, but test still fails on:
Doctrine\DBAL\Exception\ConnectionException: An exception occured in driver: SQLSTATE[08006] [7] FATAL: password authentication failed for user "test"
and to your questions:
is not but there is my circle.yml:
machine:
timezone:
Europe/Berlin
php:
version:
5.6.14
services:
- redis
- postgresql
dependencies:
pre:
- psql -c "CREATE user test with password 'test'";
- psql -c "GRANT ALL PRIVILEGES ON DATABASE circle_test to test;";
- composer install --dev --prefer-source --no-interaction
- mv ./tests/config/config.local.neon ./tests/config/config.developers.neon
- mv ./tests/config/config.circle.neon ./tests/config/config.local.neon
test:
override:
- ./vendor/bin/tester tests/
as you can see i use default version of postgres on your servers.
Thanks for help.