I try to grant privileges like that:
zielony=# GRANT ALL PRIVILEGES ON DATABASE baza_tag to strona_user;
GRANT
But nothing happends:
usename | usesysid | usecreatedb | usesuper | usecatupd | userepl | passwd | valuntil | useconfig
-------------+----------+-------------+----------+-----------+---------+----------+----------+-----------
postgres | 10 | t | t | t | t | ******** | |
zielony | 16384 | t | t | t | t | ******** | |
strona_user | 16440 | f | f | f | f | ******** | |
Also I don't have any access via php. What am i missing?
Postgresql rights system doesn't work like that. You will have to set rights on the objects them selves. Like so:
GRANT ALL ON ALL TABLES IN SCHEMA public TO strona_user;
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO strona_user;
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO strona_user;