Mogeaver 连接数据库
下载安装
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!

原因是:认证方式 远程连接不能用信任的方式
解决方法:
```
[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.
这个报错不一定是密码的问题,可能是 加密方式不对

```
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 连接数据库的更多相关文章
- react+redux教程(八)连接数据库的redux程序
前面所有的教程都是解读官方的示例代码,是时候我们自己写个连接数据库的redux程序了! 例子 这个例子代码,是我自己写的程序,一个非常简单的todo,但是包含了redux插件的用法,中间件的用法,连接 ...
- 【基于WinForm+Access局域网共享数据库的项目总结】之篇三:Access远程连接数据库和窗体打包部署
篇一:WinForm开发总体概述与技术实现 篇二:WinForm开发扇形图统计和Excel数据导出 篇三:Access远程连接数据库和窗体打包部署 [小记]:最近基于WinForm+Access数据库 ...
- winForm连接数据库(sqlserver2005)
帮同学搞个课程设计winform连接sqlserver2005 具体方法: .添加App.config文件 2.在App.config文件中添加节点 <?xml version="1. ...
- c3p0连接数据库的3种方式
c3p0连接数据库的3种方式,这里以mysql为例 1. 直接用set方法设置参数, 基本方法 ComboPooledDataSource dataSource = new ComboPooledDa ...
- Java连接数据库的辣几句话
Java连接数据库的辣几句话 1.java连接Oracle数据库 使用以下代码三个步骤: 1.下载ojdbc.jar包并导入项目中.附下载地址:http://download.csdn.net/det ...
- 基础的jdbc连接数据库操作
首先我们知道在数据库中,我们可以直接写sql或者直接通过数据库工具操作数据,但是在java程序中我们是不能直接操作数据库数据的,所以这就引入了jdbc操作. 百度百科:JDBC(Java Data B ...
- Python 3.x 连接数据库(pymysql 方式)
==================pymysql=================== 由于 MySQLdb 模块还不支持 Python3.x,所以 Python3.x 如果想连接MySQL需要安装 ...
- JDBC连接数据库
JDBC连接数据库 1.加载JDBC驱动程序. Class.forName("com.mysql.jdbc.Driver"); 建立连接,. Connection conn = D ...
- java开发中JDBC连接数据库代码和步骤
JDBC连接数据库 •创建一个以JDBC连接数据库的程序,包含7个步骤: 1.加载JDBC驱动程序: 在连接数据库之前,首先要加载想要连接的数据库的驱动到JVM(Java虚拟机), 这通过java.l ...
- 解决 PLSQL Developer无法连接数据库
问题:PLSQL Developer无法连接数据库 原因:PLSQL Developer不支持x64的Oracle客户端 解决方案:1.下载instantclient-basic-nt-12.1.0. ...
随机推荐
- Javascript | 模拟mvc实现点餐程序
MVC模式是一个比较成熟的开发模式.M是指业务模型,V是指用户界面,C则是控制器,使用MVC的目的是将M和V的实现代码分离,从而使同一个程序可以使用不同的表现形式.其中,View的定义比较清晰,就是用 ...
- 基于 Spring Cloud 的微服务脚手架
基于 Spring Cloud 的微服务脚手架 作者: Grey 原文地址: 博客园:基于 Spring Cloud 的微服务脚手架 CSDN:基于 Spring Cloud 的微服务脚手架 本文主要 ...
- Dubbo架构设计与源码解析(三)责任链模式
作者:周可强 一.责任链模式简介 1.责任链模式定义 责任链(Chain of Responsibility)模式的定义:为了避免请求发送者与多个请求处理者耦合在一起,于是将所有请求的处理者通过前一对 ...
- Spring之Bean注入Spring容器中的方式
向spring容器中加入bean有以下方式: 通过<Bean>标签 @Configuration + @Bean @Component + 组件扫描 @Import导入[见 Spring注 ...
- CH392/CH395常见问题解决方法指南
CH395 问题 1: CH395 初始化失败.解答: 1.首先检查"check_exist"命令,正常情况下 CH395 会将该命令的输入值按位取反后输出,若该命令不正常,则说明 ...
- [python] 基于NetworkX实现网络图的绘制
NETWORK CHART(网络图) 代码下载地址 网络图 (或图表或图形)显示了一组实体之间的互连.每个实体由一个或多个节点表示.节点之间的连接通过链接(或边)表示.网络的理论与实现是一个广阔的研究 ...
- JUC并发编程详解(通俗易懂)
一.JUC简介 在Java5.0提供了java.util.concurrent包,简称JUC,即Java并发编程工具包.JUC更好的支持高并发任务. 具体的有以下三个包: java.util.conc ...
- Cert Manager 申请 SSL 证书流程及相关概念 - 一
2022.3.9 用 cert-manager 申请成功通配符证书 (*.ewhisper.cn), 2022.4.30 该证书距离过期还有 30 天,cert-manager 进行自动续期,但是却失 ...
- 创建a标签使用get请求下载文件
创建a标签使用get请求下载文件 let url = `${BaseUrl.path}/aa/bb/cc?no=${this.sqcode}&pae=${this.wlName}&as ...
- day14-JdbcTemplate-01
JdbcTemplate-01 看一个实际需求: 如果希望使用spring框架做项目,Spring框架如何处理对数据库的操作呢? 方案一:使用之前的JdbcUtils类 方案二:spring提供了一个 ...