简体   繁体   中英

How to create superuser in yugabyte sql cloud cluster?

I created a yugabyte cloud cluster (free one). But cannot get access to any superuser account.
when i create cluster with default creadentials ie 'admin' as user and run

SELECT rolname, rolsuper, rolcanlogin FROM pg_roles;

it returns

           rolname        | rolsuper | rolcanlogin 
----------------------+----------+-------------
 postgres             | t        | t
 pg_monitor           | f        | f
 pg_read_all_settings | f        | f
 pg_read_all_stats    | f        | f
 pg_stat_scan_tables  | f        | f
 pg_signal_backend    | f        | f
 yb_extension         | f        | f
 yugabyte             | t        | t
 yb_superuser         | f        | f
 admin                | f        | t
(10 rows)

user 'admin' does not have superuser privileges
and if use 'postgres' as user and a password white creating cluster and try to login it returns

Password for user postgres: 
ysqlsh: FATAL:  password authentication failed for user "postgres"
FATAL:  no pg_hba.conf entry for host "34.82.214.52", user "postgres", database "yugabyte", SSL off

But in case of YCQL I can get superuser access with both default 'admin' user on any custom user like 'postgres'

How can I get super user access for YSQL?

Short answer: You can't, because it's a Yugabyte managed instance.

Please use the 'admin' user that is created by default, which gives most of the superuser capabilities.

For management of the database cluster, we have to prevent from performing activities that would compromise database security and get access to the environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM