简体   繁体   English

在 postgres 谷歌云中将用户升级为超级用户

[英]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 the SUPERUSER or REPLICATION attributes. 它没有SUPERUSERREPLICATION属性。

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.

相关问题 是否可以使用“postgres”数据库中的数据升级 Cloud SQL postresql 版本 - Is it possible to upgrade Cloud SQL postresql version with data in the 'postgres' database 本地 Postgres 数据库到谷歌云 PostgreSQL Github - Local Postgres database to Google Cloud PostgreSQL Github Google Cloud Storage 到 Google Cloud SQL (Postgres) 运算符 Airflow(或 Composer) - Google Cloud Storage To Google Cloud SQL (Postgres) Operator in Airflow (or Composer) 是否可以在 google postgres cloud sql 中支持 orafce - Is it possible to support orafce in google postgres cloud sql 在 Google Cloud Postgres 上启用逻辑复制 - Enable logical replication on Google Cloud Postgres 如何在 Google Cloud 上备份 Kubernetes 中的 Postgres 数据库? - How to backup a Postgres database in Kubernetes on Google Cloud? Google Cloud postgres – 从 Heroku 连接 - Google Cloud postgres – connecting from Heroku 如何在谷歌云构建上升级节点 js 版本 - How to upgrade node js version on google cloud build 如何增加 Google Cloud SQL Postgres 数据库的连接限制? - How to increase the connection limit for the Google Cloud SQL Postgres database? 在Google Cloud SQL Postgres上使用Terraform创建一个Replication Slot - Use Terraform on Google Cloud SQL Postgres to create a Replication Slot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM