下载安装
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. 《HTTP权威指南》– 9.识别和认证

    客户端识别与Cookie机制 承载用户相关信息的HTTP首部 From Email地址 User-Agent 浏览器软件 Referer 跳转链接<来自> Author ziation 用 ...

  2. nuxt.js中登录、注册(密码登录和手机验证码登录)

    <!-- 登录弹框 --> <div class="mask" v-show="flag"> <div class="m ...

  3. S2-032 CVE-2016-3081 远程代码执行

    漏洞名称 CVE-2016-3081 S2-032 远程代码执行 利用条件 Struts 2.3.20 - Struts Struts 2.3.28 ( 2.3.20.3 和 2.3.24.3 除外) ...

  4. Java用户交互方法——Scanner

    Scanner用户交互 使用Next方法接收 Scanner scanner = new Scanner(System.in); if(scanner.hasNext()){//判断用户有无输入 St ...

  5. Postman实现UI自动化测试

    转载请注明出处️ 作者:测试蔡坨坨 原文链接:caituotuo.top/1db4fa44.html 你好,我是测试蔡坨坨. 看到这篇文章的标题,是不是有小伙伴会感到惊讶呢? Postman不是做接口 ...

  6. elasticsearch实现基于拼音搜索

    目录 1.背景 2.安装拼音分词器 3.拼音分词器提供的功能 4.简单测试一下拼音分词器 4.1 dsl 4.2 运行结果 5.es中分词器的组成 6.自定义一个分词器实现拼音和中文的搜索 1.创建m ...

  7. 字节输出流的续写和换行-字节输入流_inputS Stream类

    字节输出流的续写和换行 package demo02.OutputStream; import java.io.FileOutputStream; import java.io.IOException ...

  8. python语法进阶这一篇就够了

    前言 前面我们已经学习了Python的基础语法,了解了Python的分支结构,也就是选择结构.循环结构以及函数这些具体的框架,还学习了列表.元组.字典.字符串这些Python中特有的数据结构,还用这些 ...

  9. 【随笔记】NDK 编译开源库 ffmpeg

    一.下载源代码 wget http://ffmpeg.org/releases/ffmpeg-4.4.tar.gz tar -zxvf ffmpeg-4.4.tar.gz 二.编译配置脚本 #! /b ...

  10. Django-Django基本使用、app、三板斧

    1.纯手撸web框架 1.web框架的本质 理解1:连接前端与数据库的中间介质 理解2:socket服务端 2.手写web框架 1.编写socket服务端代码 2.浏览器访问响应无效>>& ...