yii - PostgreSQL user's privileges listing for a particular database -


i have user created under login roles in pgadmin. user's name 'myapp'.

here pgsql syntax create it.

create role myapp login   encrypted password 'md58e0b379fc6e92422518682611bcf2d42'   nosuperuser inherit nocreatedb nocreaterole noreplication; 

all these days had application developed yii framework connect database super user in end. is.. user 'postgres'

but after doing release started getting error below

enter image description here

i found because of have set permission myapp user role newly created table have missed same sequence wrote below script resolve..

grant on table css_ataps_client_outgoing_call_dates_id_seq myappadmin; grant select, update on table css_ataps_client_outgoing_call_dates_id_seq myapp; 

now need enable application connect database using same login production application myapp not postgres.

but unfortunately doesn't work unless use postgres user. error got when trying connect myapp user nothing. not recorded in logs. can confirm login details same , working , issue user myapp doesnt have read / write access single table. so want check table in database doesnt have permission or vice versa.

please tell me way find out. thanks.

this do. try , let me know.

grant on database <ur database name> myapp; <- not 

try query..!

grant select,update,insert,delete on tables in schema public myapp; 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -