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!
![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 连接数据库的更多相关文章
- 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. ...
随机推荐
- forms组件源码剖析
一:forms组件源码剖析 1.forms组件源码切入点: 1.0 form_obj.is_valid() 2.0 def is_valid(self): """ Ret ...
- MySQL单表查询(分组-筛选-过滤-去重-排序-分页-判断-正则)
目录 一:单表查询 1.单表查询(前期准备) 2.插入记录(写入数据) 3.查询关键字 二:查询关键字之where 1.查询id大于等于3小于等于6的数据 2.查询薪资是20000或者18000或者1 ...
- Qt对象跨线程出现的问题记录,以及解决方案
Qt在跨线程开发的时候可能会出现不少问题,在这里记录一下 Qt目前用下来还是非常强大的,虽然只是用在桌面端程序开发上,但是其强大的桌面开发库真的挺好用的(Layout除外,你妈死了). Qt除了UI, ...
- 自研ORM框架 实现类似EF Core Include 拆分查询 支持自定义条件、排序、选择
Baozi, I'm Mr.Zhong I like to brush TikTok, I know that anchors like to call it that, haha!Recently, ...
- SQLMap入门——获取数据库用户的密码
列出数据库用户的密码 如果当前用户有读取包含用户密码的权限,SQLMap会先列举出用户,然后列出Hash,并尝试破解 python sqlmap.py -u http://localhost/sqli ...
- Octave/Matlab初步学习
Octave/Matlab初步学习 1.基本运算 和其他语言一样,可以通过数学运算符号来实现数学公式的运算.逻辑运算也基本相同 要注意的是,≠这个符号,表达式为 1 ~= 2 而不是用!=来表达 ...
- XSS漏洞利用案例实验
前言 此为XSS漏洞学习笔记,记录XSS的学习过程,方便今后复习使用,有写的不好的地方请见谅,大佬勿喷. GET型XSS利用 攻击流程 攻击实现 以pikachu网站的反射型XSS(GET)为例 攻击 ...
- python 学生管理系统 文件版 增删改查
# 在程序开始之前完成数据的读取 # 存在着循环 # 循环的内容 # 将操作内容分解为函数 def sel_student(students_list): """ 查看所 ...
- AVM 拖动组件 movable-view 介绍
应用开发中拖动功能是比较常见的 ,如滑动解锁,滑动验证码,实现一些小游戏,少儿编程中常见. avm.js 是多端开发框架,一套代码可同时编译为APP .小程序.h5. avm 框架中实现拖动功能非常简 ...
- 痞子衡嵌入式:Farewell, 我的写博故事2016-2019
-- 题图:苏州天平山枫叶 现在是 2022 年末,痞子衡又要起笔博文年终总结了,看着 2020 年之前的博文总结缺失,始终觉得缺憾,所以写下此篇 2016 - 2019 总结合辑.2016 年之前, ...