export LANG=zh_CN.UTF-8
# 创建用户
useradd postgres
passwd postgres # 12345678
mkdir /opt/guassdb
tar -zxvf openGauss-Lite-5.0.2-CentOS-x86_64.tar.gz -C ./guassdb/
chown -R guass:guass /opt/guassdb
vim /etc/selinux/config
SELINUX=disabled
setenforce 0
swapoff -a
vim /etc/systemd/logind.conf
RemoveIPC=no
systemctl restart systemd-logind
vi /etc/sysctl.conf
kernel.sem = 250 32000 100 999
sysctl -p
#
echo 12345678 | sh ./install.sh --mode single -D ~/openGauss/data -R /opt/guassdb/install --start
### 启动数据库
./gaussdb -D /home/postgres/openGauss/data --single_node
./gs_ctl start -D /home/postgres/openGauss/data -Z single_node -l server.log
./gs_ctl start | stop | restart
# 登录
gsql -d postgres -U guass -p 5432 -h localhost
CREATE USER test1 WITH PASSWORD '12345678';
CREATE USER appview WITH PASSWORD '12345678';
gsql -d postgres -U isoft -p 5432 -h 192.168.229.130
# 授权
GRANT ALL PRIVILEGES TO test1 ;
# 授权 创建 数据库 删除数据库
GRANT CREATEDB, DROPDB TO test1 ;
# 授权 创建 索引 删除索引
GRANT CREATE INDEX, DROP INDEX ON ALL TABLES IN DATABASE test TO test1 ;
# 授权 允许用户查询数据库中的全部表
GRANT SELECT ON ALL TABLES IN DATABASE test TO appview;
# 授权 允许用户 crud 数据库中的全部表
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN DATABASE test TO test1 ;
# 撤销授权
REVOKE ALL PRIVILEGES FROM test1 ;
# 创建角色
create role test1 IDENTIFIED by '12345678';
这款数据库实际上就是 postgres的二开版本 ,没什么特别的
标签:test1,guassdb,postgres,GRANT,12345678,版本,lite,openGauss From: https://blog.csdn.net/confident3/article/details/144566655