首页 > 其他 > 详细

pg用户赋予只读权限

时间:2020-06-21 18:54:08      阅读:83      评论:0      收藏:0      [点我收藏+]

./createuser --interactive iomsx;
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n

./psql -p 15432
alter user iomsx with password ‘iomsx2_2022022‘;
alter user iomsx set default_transaction_read_only=on;
grant all on database skylarx2 to ioms;
\c skylarx2
grant select on all tables in schema public to ioms;
\quit

vi pg_hba.conf
peer 修改成md5
/etc/init.d/postgres/reload

./psql -p 15432 -U ioms -d skylarx2

pg用户赋予只读权限

原文:https://www.cnblogs.com/vzhangxk/p/13173168.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!