且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

postgresql创建只读账号

更新时间:2022-09-13 19:17:47

postgresql创建只读账号:


# su - postgres

$ psql

# \c icinga2;

# create user aa with password 'xxx';

# grant select on all tables in schema public to aa;  (对现有表生效)

# alter default privileges in schema public grant select on tables to icuser_ro; (对未来的新加表生效)

#\q

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/1978480如需转载请自行联系原作者


yangzhimingg