• 使用dbeaver连接GaussDB数据库(集中式)


    服务端方式登录

    默认初始用户登录方式:

    [omm@gaussdb01 ~]$ gsql -d postgres -p 30100
    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 help.
    
    • 1
    • 2
    • 3
    • 4

    第一步:新建用户和数据库并授权

    新建用户
    openGauss=# create user lily password 'qwe123QWE';
    CREATE ROLE
    给用户授权
    openGauss=# grant all privileges to lily;
    ALTER ROLE
    新建数据库
    openGauss=# create database test1 template template0 lc_collate 'C' lc_ctype 'C' encoding 'gbk';
    CREATE DATABASE
    给lily用户对数据库有登录权限
    openGauss=# grant connect on database test1 to lily;
    GRANT
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    使用新建用户进行数据库登录

    [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 help.
    
    test1=> 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    第二步:新建驱动管理器(DBeaver为例)

    1、点击’数据库‘–>’驱动管理器‘
    在这里插入图片描述
    **2、填写名称和库的选择
    类名:org.postgresql.Driver
    url模板:jdbc:postgresql://{host}[:{port}]/{database}
    在这里插入图片描述
    点击添加文件
    在这里插入图片描述
    选择gsjdbc4.jar包,点击确定
    在这里插入图片描述
    第三步:新建连接的数据库
    1、点击新建数据库
    在这里插入图片描述
    2、填写内容,点击测试连接
    在这里插入图片描述
    3、连接成功
    在这里插入图片描述

  • 相关阅读:
    2023-10-5一些笔试题(3)
    CSS学习笔记
    CMake继续学习
    【DDPM论文解读】Denoising Diffusion Probabilistic Models
    动态规划--算法
    es的检索-DSL语法和Java-RestClient实现
    selenium模拟登录某宝
    大模型相关资料整理
    在Proxmox中固定网卡名字
    pyinstaller打包显示no moule解决方法
  • 原文地址:https://blog.csdn.net/m0_46400195/article/details/127963287