[英]upgrade user to superuser in postgres google cloud
How do I create a user with superuser role in Postgres serwer with google cloud console?如何使用谷歌云控制台在 Postgres serwer 中创建具有超级用户角色的用户?
When I create databases in google cloud, the default user is a non-superuser.当我在谷歌云中创建数据库时,默认用户是非超级用户。 From this role it is not possible to upgrade.
从此角色无法升级。
no way: 没门:
https://cloud.google.com/sql/docs/postgres/users https://cloud.google.com/sql/docs/postgres/users
The postgres user is part of the
cloudsqlsuperuser
role, and has the following attributes (privileges): CREATEROLE, CREATEDB, and LOGIN.postgres用户是
cloudsqlsuperuser
角色的一部分,具有以下属性(特权):CREATEROLE,CREATEDB和LOGIN。 It does not have theSUPERUSER
orREPLICATION
attributes.它没有
SUPERUSER
或REPLICATION
属性。
Here's my own script:这是我自己的脚本:
GRANT cloudsqlimportexport, cloudsqlsuperuser, pg_read_all_data, pg_write_all_data, postgres TO myawsumuser WITH ADMIN OPTION;
GRANT ALL PRIVILEGES ON DATABASE mytestdb1 TO myawsumuser WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON DATABASE postgres TO myawsumuser WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO myawsumuser with grant option;
GRANT USAGE ON SCHEMA public TO myawsumuser with grant option;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO myawsumuser with admin option;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO myawsumuser with grant option;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO myawsumuser with grant option;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO myawsumuser with grant option;
Good links: https://cloud.google.com/sql/docs/postgres/users好的链接: https://cloud.google.com/sql/docs/postgres/users
How to grant all privileges on views to arbitrary user 如何将视图的所有权限授予任意用户
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.