下载安装
Mogeaver是一款开源软件,下载地址如下:https://docs.mogdb.io/zh/mogdb/v3.0/mogeaver-release-notes

根据您的操作系统选择相应的安装包,下载完成后直接双击安装即可。

配置连接串
首次打开软件会弹出“创建新连接”窗口,如下图所示

选择MogDB

在测试连接可能会出现的问题
1、[192.168.3.100:51781/192.168.3.25:26000] FATAL: Forbid remote connection with trust method!
![image.png](https://oss-emcsprod-public.modb.pro/image/editor/20220716-a9afea6f-01b5-48dc-b32d-8eb3414a2fe0.png)
原因是:认证方式 远程连接不能用信任的方式
解决方法:
```

[omm@db1 ~]$
[omm@db1 ~]$
[omm@db1 ~]$ cd $PGHOME
[omm@db1 db1]$ vi pg_hba.conf
# a SIGHUP signal. If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect. You can
# use "pg_ctl reload" to do that.

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
#
# NOTICE:
# ----------------------------------
#
# When you configure this file, please configure it from top to bottom,
# higher priority needs to be configured in front.

# CAUTION: Configuring the system for local "trust" authentication
# allows any local user to connect as any PostgreSQL user, including
# the database sysadmin. If you do not trust all your local users,
# use another authentication method.

# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all trust
host miao dbmt 192.168.3.25/32 sha256
# IPv4 local connections:
host all all 127.0.0.1/32 trust

host all all 192.168.3.25/32 md5
host all all 192.168.3.100/32 trust <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<这个需要改成md5 或者sha256
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication omm trust
#host replication omm 127.0.0.1/32 trust
#host replication omm ::1/128 trust
"pg_hba.conf" 102L, 4613C written
[omm@db1 db1]$ gs_om -t stop
Stopping cluster.
=========================================
Successfully stopped cluster.
=========================================
End stop cluster.
[omm@db1 db1]$ gs_om -t start
Starting cluster.
=========================================
[SUCCESS] db1
2022-07-16 10:55:12.714 62d22890.1 [unknown] 139689208698432 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING: Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers (1024 Mbytes) or shared memory (1967 Mbytes) is larger.
=========================================
Successfully started.
[omm@db1 db1]$

```
2、
[192.168.3.100:63769/192.168.3.25:26000] FATAL: Invalid username/password,login denied.
这个报错不一定是密码的问题,可能是 加密方式不对
![image.png](https://oss-emcsprod-public.modb.pro/image/editor/20220716-f92cf688-b2d3-4874-9d0a-95e28903ab1b.png)

```
omm@db1 db1]$ vi pg_hba.conf
# a SIGHUP signal. If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect. You can
# use "pg_ctl reload" to do that.

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
#
# NOTICE:
# ----------------------------------
#
# When you configure this file, please configure it from top to bottom,
# higher priority needs to be configured in front.

# CAUTION: Configuring the system for local "trust" authentication
# allows any local user to connect as any PostgreSQL user, including
# the database sysadmin. If you do not trust all your local users,
# use another authentication method.

# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all trust
host miao dbmt 192.168.3.25/32 sha256
# IPv4 local connections:
host all all 127.0.0.1/32 trust

host all all 192.168.3.25/32 md5
host all all 192.168.3.100/32 md5 《《《《《《《《《需要改成sha256
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication omm trust
#host replication omm 127.0.0.1/32 trust
#host replication omm ::1/128 trust

```
测试2个用户的密码加密方式
```
miao=# show password_encryption_type;
password_encryption_type
--------------------------
2
(1 row)
miao=# create user em_ljc identified by "Nov_1308";
CREATE ROLE
miao=#
miao=# select rolname,rolpassword from pg_authid where rolname='em_ljc';
rolname | rolpassword

---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------
em_ljc | sha25611fba856dc8494bb752f69b8c7fc376b363178b0c63ba631396adf654cd342a92ce9e008e5694908ad34340945e43499b7d6917cd822494c046ea2d9ac3aaa3a9a41588b3821d3bd0b8481a866aae555deeab6a6265b383a9b73a6f56a9f61
adecdfecefade
(1 row)
miao=# alter system set password_encryption_type =0;
ALTER SYSTEM SET
miao=# create user em_ljc1 identified by "Nov_1308";
NOTICE: The encrypted password contains MD5 ciphertext, which is not secure.
CREATE ROLE
miao=# select rolname,rolpassword from pg_authid where rolname='em_ljc1';
rolname | rolpassword
---------+-------------------------------------
em_ljc1 | md56c36c5816e688aec2e011a1a516e148f
(1 row)

miao=#

```

Mogeaver 连接数据库的更多相关文章

  1. react+redux教程(八)连接数据库的redux程序

    前面所有的教程都是解读官方的示例代码,是时候我们自己写个连接数据库的redux程序了! 例子 这个例子代码,是我自己写的程序,一个非常简单的todo,但是包含了redux插件的用法,中间件的用法,连接 ...

  2. 【基于WinForm+Access局域网共享数据库的项目总结】之篇三:Access远程连接数据库和窗体打包部署

    篇一:WinForm开发总体概述与技术实现 篇二:WinForm开发扇形图统计和Excel数据导出 篇三:Access远程连接数据库和窗体打包部署 [小记]:最近基于WinForm+Access数据库 ...

  3. winForm连接数据库(sqlserver2005)

    帮同学搞个课程设计winform连接sqlserver2005 具体方法: .添加App.config文件 2.在App.config文件中添加节点 <?xml version="1. ...

  4. c3p0连接数据库的3种方式

    c3p0连接数据库的3种方式,这里以mysql为例 1. 直接用set方法设置参数, 基本方法 ComboPooledDataSource dataSource = new ComboPooledDa ...

  5. Java连接数据库的辣几句话

    Java连接数据库的辣几句话 1.java连接Oracle数据库 使用以下代码三个步骤: 1.下载ojdbc.jar包并导入项目中.附下载地址:http://download.csdn.net/det ...

  6. 基础的jdbc连接数据库操作

    首先我们知道在数据库中,我们可以直接写sql或者直接通过数据库工具操作数据,但是在java程序中我们是不能直接操作数据库数据的,所以这就引入了jdbc操作. 百度百科:JDBC(Java Data B ...

  7. Python 3.x 连接数据库(pymysql 方式)

    ==================pymysql=================== 由于 MySQLdb 模块还不支持 Python3.x,所以 Python3.x 如果想连接MySQL需要安装 ...

  8. JDBC连接数据库

    JDBC连接数据库 1.加载JDBC驱动程序. Class.forName("com.mysql.jdbc.Driver"); 建立连接,. Connection conn = D ...

  9. java开发中JDBC连接数据库代码和步骤

    JDBC连接数据库 •创建一个以JDBC连接数据库的程序,包含7个步骤: 1.加载JDBC驱动程序: 在连接数据库之前,首先要加载想要连接的数据库的驱动到JVM(Java虚拟机), 这通过java.l ...

  10. 解决 PLSQL Developer无法连接数据库

    问题:PLSQL Developer无法连接数据库 原因:PLSQL Developer不支持x64的Oracle客户端 解决方案:1.下载instantclient-basic-nt-12.1.0. ...

随机推荐

  1. Jgit的使用笔记

    原文:Jgit的使用笔记 - Stars-One的杂货小窝 之前整的一个系统,涉及到git代码的推送,是通过cmd命令去推送的,然后最近在产品验收的时候,测试部门随意填了个git仓库,然后导致仓库代码 ...

  2. flutter系列之:如丝般顺滑的SliverAppBar

    目录 简介 SliverAppBar详解 SliverAppBar的使用 总结 简介 对于一个APP来说,肯定会有一个AppBar,这个AppBar一般包含了APP的导航信息等.虽然我们可以用一个固定 ...

  3. python注释、变量、数据类型详细

    目录 1.python注释 2.PEP8规范 3.变量与常量 1.python中的变量 2.变量名的命名规范 3.常量的基本使用 1.python注释 什么是注释? 注释是对代码的解释说明,写注释是为 ...

  4. VUE项目无法启动NODE版本与NODE-SASS、SASS-LOADER版本不兼容解决方案

    一.错误分析 在VUE项目开发中,我们经常会遇到报错: Node Sass version 7.0.1 is incompatible with ^4.0.0. 网上解决方案也千奇百怪,最终操作下来, ...

  5. Hive详解(02) - Hive 3.1.2安装

    Hive详解(02) - Hive 3.1.2安装 安装准备 Hive下载地址 Hive官网地址:http://hive.apache.org/ 官方文档查看地址:https://cwiki.apac ...

  6. Maui 读取外部文件显示到Blazor中

    Maui 读取外部文件显示到Blazor中 首先在maui blazor中无法直接读取外部文件显示 ,但是可以通过base64去显示 但是由于base64太长可能影响界面卡顿 这个时候我们可以使用bl ...

  7. Educational Codeforces Round 33 (Rated for Div. 2) 虚拟赛体验

    前言 就只做出了 \(A,B,C,D\) 是不是很弱? A.Chess For Three A,B,C 三人下棋,A和B先下,每次下完棋之后由现在观战的人(例如第一局就由C)代替下输的人. 每次输入一 ...

  8. 题解 CF1579G Minimal Coverage

    CF1579G Minimal Coverage dp好题! link to the problem 解法 首先需要观察到:如果最长线段的长度为\(maxL\),那么答案不可能超过\(2maxL\) ...

  9. Java后台如何接收与处理JSON类型数据

    项目开发中偶尔会使用到某个为JSON类型的字段,一个字段中又包含多个其他的字段. 这种设计方式是根据实际需要来进行处理的,比如规则可能包含多条,每一条规则又包含 多个字段:再比如一些特殊的应用场景如标 ...

  10. Spring Native打包本地镜像,无需通过Graal的maven插件buildtools

    简介 在文章<GraalVM和Spring Native尝鲜,一步步让Springboot启动飞起来,66ms完成启动>中,我们介绍了如何使用Spring Native和buildtool ...