11 Star 1 Fork 2

openGauss / openGauss-connector-nodejs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

openGauss-connector-nodejs

介绍

基于node-postgres的一个简单的openGaussNode.js驱动.

安装教程

    npm install & npm run build

使用说明

注意事项

  • [安装时SEMMNI错误]

    简易安装的时候,可能会遇到以下错误

    "On systemwide basis, the maximum number of SEMMNI is not correct. the current SEMMNI value is: .... Please check it."

    根据安装脚本计算出,信号量SEMMNI应该大于321.875

    在CentOS 7 可以用一下命令修改 SEMMNI

    $ sudo vim /etc/sysctl.conf

    添加以下数据到文件末尾

    kernel.sem = 250 32000 100 400

    使用指令 shift+ double z 或者 :wq保存文件修改

    最后执行修改

    $ /sbin/sysctl -p
  • [修改加密方式需要更新自己的密码或者新建一个用户]

    否则就算用户名密码都正确的情况下仍会报错非法用户名/密码(Invalid username/password, login denied)

    可以通过sql命令 select rolname,rolpassword from pg_authid; 来判断当前用户密码的加密方式。

    [账号锁定]

    openGauss账号被锁定解决办法,进入openGauss输入以下命令: [database_name]# alter user [username] account unlock;

  • [添加IPv4规则允许所有外部链接的密码都由SHA256验证]

    打开/opt/software/openGauss/data/single_node/pg_hba.conf 添加以下数据 add this: host all all 0.0.0.0/0 sha256 详情请看这里

  • [npminstall可能会出现的错误]

    若在此处操作出现 Cannot find ..... 错误,请查看自己的node版本是否为v16以上 npm版本是否为v7以上,若不是,请安装最新版本node

简单测试

修改packages/pg/test-1.js的服务器配置并执行如下指令

cd packages/pg/
node test-1.js
MIT License Copyright (c) 2010 - 2021 Brian Carlson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
JavaScript 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/opengauss/openGauss-connector-nodejs.git
git@gitee.com:opengauss/openGauss-connector-nodejs.git
opengauss
openGauss-connector-nodejs
openGauss-connector-nodejs
master

搜索帮助