GaussDB-集群数据库变为只读模式ReadOnly(实验)`ERROR: cannot execute CREATE TABLE in a read-only transaction`

为了验证实验,先把集群的磁盘占用率改为50%

[omm@gaussdb01 ~]$ gs_guc reload -Z cmserver -N all -I all -c "datastorage_threshold_value_check=50"
The gs_guc run with the following arguments: [gs_guc -Z cmserver -N all -I all -c datastorage_threshold_value_check=50 reload ].
Begin to perform the total nodes: 3.
Popen count is 3, Popen success count is 3, Popen failure count is 0.
Begin to perform gs_guc for cm_servers.
Command count is 3, Command success count is 3, Command failure count is 0.

Total instances: 3. Failed instances: 0.
ALL: Success to perform gs_guc!

在这里插入图片描述
查询现在磁盘占用率

[root@gaussdb01 cm_server]# cat  /data/cluster/data/cm/cm_server/cm_server.conf | grep datastorage_threshold_value_check
datastorage_threshold_value_check = 50

在这里插入图片描述

1、查看集群状态
[omm@gaussdb01 ~]$ cm_ctl query -Cvipd
2、创建用户
新建用户
openGauss=# create user lily password 'qwe123QWE';
CREATE ROLE
给用户授权
openGauss=# grant all privileges to lily;
ALTER ROLE
给lily用户对数据库有登录权限
openGauss=# grant connect on database test1 to lily;
GRANT
2、创建表空间和数据库
使用新建用户进行数据库登录
[omm@gaussdb01 ~]$ gsql -d test1 -U lily -W'qwe123QWE' -p 30100 -r
gsql ((GaussDB Kernel V500R002C10 build 04860477) compiled at 2022-10-28 20:04:35 commit 3892 last mr 8894 release)
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for he
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值