首页 > 数据库 >Mogeaver 连接数据库

Mogeaver 连接数据库

时间:2024-02-19 19:57:18浏览次数:31  
标签:Mogeaver 数据库 192.168 miao host 32 trust local 连接

下载安装
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
原因是:认证方式 远程连接不能用信任的方式
解决方法:


[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

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,数据库,192.168,miao,host,32,trust,local,连接
From: https://www.cnblogs.com/xinxin1222/p/18021830

相关文章

  • Oracle 低版本客户端连接19C报错ORA-28040
    适用范围12.2+问题概述客户使用Oracle11.2客户端连接Oracle19c的时候,报错:ORA-28040:NomatchingauthenticationprotocolORA-28040:没有匹配的验证协议问题原因原因客户端与服务器的没有匹配的认证协议解决方案1、在数据库服务器上的$ORACLE_HOME/network/admin/sql......
  • Docker 安装 SqlServer 和连接
    dockerpullmcr.microsoft.com/mssql/server:2019-latest--拉取dockerrun-e"ACCEPT_EULA=Y"-e"MSSQL_SA_PASSWORD=MyName2024"-p14330:1433--namesql1--hostnamesql1-dmcr.microsoft.com/mssql/server:2019-latest--运行-d是你......
  • 使用VS Code Remote SSH连接上服务器实现远程开发
    1下载VSCODE,Windows版本https://code.visualstudio.com/updates/v1_852安装插件3 配置SSH密钥,上传公钥到服务器4连接成功,直接操作远程目录和文件   远程开发https://code.visualstudio.com/docs/remote/remote-overview https://www.jianshu.com/p/37bbec3788......
  • Centos7下安装Oscar数据库
    1、脚本安装创建脚本oscar.shyuminstall-ywgetwget--no-check-certificatehttp://www.rarlab.com/rar/rarlinux-x64-5.3.0.tar.gztarzxvfrarlinux-x64-5.3.0.tar.gz&&cdrar/&&makeinstallwgethttp://www.shentongdata.com/old_bak/iso/wzsyx/ShenT......
  • 【Spring】【Mybatis】【Dynamic-Datasource】【事务】Spring + MyBaits + 事务 + 动
    1 前言我上次有一篇是讲了从一个数据库连接的角度分析了 Spring+MyBaits+事务三者的联系,这是在数据源固定的情况下。那么可能会遇到,比如按租户的分库,这种情况下我们会引入动态的数据源比如苞米豆团队的Dynamic-Datasource或者是自己公司内部封装的工具、框架等,这节我们......
  • 01 基本框架:一个键值数据库包含什么
    01基本框架:一个键值数据库包含什么前言:对蒋德钧老师的《Redis核心技术与实战》课程的学习记录。构造简单的键值数据库SimpleKV考虑里面可以存什么样的数据,对数据可以做什么样的操作,也就是数据模型和操作接口。对于键值数据库而言,基本的数据模型是key-value模型。Redis......
  • Linux下oracle数据库安装
    1.环境准备:关闭防火墙,禁用开机自启防火墙关闭selinux配置网络IP静态地址添加组groupadddbagroupaddoinstall创建Oracle用户:useradd-d/home/oracle-goinstall-Gdba-moracle设计密码: passwdoracle 创建Oracle目录 mkdir-p/u01/app/oracle/product/11......
  • Android家庭记账本开发第四天:SQLite数据库操作
    SQlite数据库是一个轻量级的数据库,被用在嵌入式设备上,2019年6月还在流行的两大移动终端操作系统,Android和ios都支持这款数据库。AndroidSDK中有一个包android.database.sqlite,其中专门对SQLite数据库进行了封装,并提供了一套供android使用的API。SQLiteOpenHelper 类包含一组用......
  • 查询 MMDB 数据库
    importjava.io.File;importjava.net.InetAddress;importcom.fasterxml.jackson.databind.JsonNode;importcom.maxmind.db.Reader;publicclassIpDemo{publicstaticvoidmain(String[]args)throwsException{Filedatabase=newFile("re......
  • 探究二维码技术:连接现实与数字世界的桥梁
    引言:二维码已经成为现代社会中广泛应用的一种技术工具。它不仅在商业领域中被广泛使用,还在日常生活中发挥着重要的作用。本文将介绍二维码的概念、原理以及在不同领域中的应用,帮助读者更好地理解并利用二维码技术。二维码生成器|一个覆盖广泛主题工具的高效在线平台(amd79......