linux安装华为高斯数据库

 

华为安装部署流程:
https://doc.hcs.huawei.com/db/zh-cn/gaussdbqlh/2.23.07.210/install/qlh_04_0025.html

高斯数据库文档说明书下载:
https://support.huawei.com/enterprise/zh/cloud-computing/gaussdb-pid-251517148

https://www.modb.pro/db/11248


用docker快速安装:https://blog.csdn.net/jmshl/article/details/134578666

1,安装Docker:
[root@openEuler ~]# yum install -y docker

2,拉取镜像:
[root@openEuler ~]# docker pull enmotech/opengauss:latest
latest: Pulling from enmotech/opengauss
ca1778b69356: Pull complete
6bc68ebf221c: Pull complete
62149130862a: Pull complete
a578cee72a33: Pull complete
e63b015b79f9: Pull complete
Digest: sha256:97a8f2e24ca408fe9485af6e4b98accabca49c2b102e9247b188c62eadb7a73c
Status: Downloaded newer image for enmotech/opengauss:latest

3,运行容器:
[root@openEuler ~]# docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Abcd@1234 -p 8090:5432 enmotech/opengauss:latest
d577c549c60217b159e3cfc52f0e5261b0222422cf93d7c6f115cbef9d40e8fe


查看容器:
[root@openEuler ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d577c549c602 enmotech/opengauss:latest "entrypoint.sh gauss…" 32 seconds ago Exited (1) 31 seconds ago opengauss


4,进入容器,并切换omm用户,使用gsql连接高斯数据库:
[root@openEuler ~]# docker exec -it opengauss sh
# su - omm
omm@fd8714c57ef7:~$ gsql
gsql ((openGauss 5.0.0 build a07d57c3) compiled at 2023-03-29 03:09:38 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

omm=#


常用命令:
---切换omm用户
su -omm
--进入数据库
zsql sys/Changeme 123@127.0.0.1:1888 -q 免密---更改密码
ALTER USER SYS identified by '123qqq...A',
---创建mark用户
create user mark identified by '123qqq...A'
---给予权限
grant DBAQ to mark;
----删除用户
drop user mark;
----查看表
select * from DB USERS.
----索引
create index name on users(name);drop index name;
---函数
select substr('ABCDE',3,2);截取2个字符colort ronlaro/'ahrdofn''a'”

 

posted @ 2024-05-14 14:26  海宏软件  阅读(162)  评论(0编辑  收藏  举报