小编sel*_*van的帖子

如何在 Clickhouse 数据库上搜索不区分大小写的查询字符串?

我正在使用 PHP 和后端 ClickHouse 数据库开发站点。当我使用 like 查询时,它不支持区分大小写的单词。

select id,comments from discussion where  comments LIKE "%Data not reflect%";
Run Code Online (Sandbox Code Playgroud)

有没有办法搜索不区分大小写的单词?

sql clickhouse

6
推荐指数
3
解决办法
7520
查看次数

如何在节点js中使用node-ssh断开ssh连接

任何人都可以帮助我,如何在节点js中使用node-ssh模块断开ssh连接.另外如何处理错误.

我的代码是

 driver = require('node-ssh');

    ssh = new driver({
              host: '192.168.*.*',
              username: 'user',
              password: 'password',
              privateKey : require('fs').readFileSync('/tmp/my_key')
            });

    ssh.connect().then(function() {
           /*
       some code
        */

            },function(error) {
                console.log(error);

    });
Run Code Online (Sandbox Code Playgroud)

请帮忙.

node.js

5
推荐指数
2
解决办法
2664
查看次数

使用节点js中的私钥连接ssh服务器

将 ssh 服务器与节点 js 中的身份文件连接时出现以下错误

错误:无法读取私钥文件

my code:

    driver = require('node-ssh');

    ssh = new driver({
              host: '192.168.*.*',
              username: 'user',
              password: 'password',
              privateKey : require('fs').readFileSync('/tmp/my_key')
            });

    ssh.connect().then(function() {
           /*
       some code
        */

            },function(error) {
                console.log(error);

            });

But if i connect from my linux machine, it is connected.

ssh -i /tmp/my_key  user@192.168.*.*

Please give any solution for this.
Run Code Online (Sandbox Code Playgroud)

node.js

3
推荐指数
1
解决办法
8938
查看次数

如何使用nodejs获取mongodb的slave状态?

我想使用节点js获取mongodb服务器的slavestatus。这是代码。

var Db = require('mongodb').Db, Server = require('mongodb').Server;
        var db = new Db('admin', new Server(conf.host, conf.port));
        db.open(function(err, db1) {
            var adminDb = db1.admin();
             adminDb.command({ "status": 1 },function(err,result) {
                  console.log("output="+result);
            });
    });
Run Code Online (Sandbox Code Playgroud)

但我收到错误。

错误=MongoError:没有这样的命令:'状态',错误的cmd:'{状态:1}'

javascript mongodb node.js

3
推荐指数
1
解决办法
1567
查看次数

未在centos 7中安装带有MSSQL的PHP

我想在CentOS Linux系统中通过PHP连接MSSQl服务器。但是低于错误,

Fatal error: Call to undefined function mssql_connect() in /var/www/h.....
Run Code Online (Sandbox Code Playgroud)

为此,我参考了一些网站并找到了解决方案。但这也不起作用。在这里,我尝试安装php5-sybase,但出现一些错误,

yum install php5-sybase
Loaded plugins: fastestmirror, langpacks
apt.sw.be_redhat_el2.1_en_mirrors-rpmforge| 1.9 kB  00:00:00
remi-safe                                 | 2.9 kB  00:00:00


 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. …
Run Code Online (Sandbox Code Playgroud)

php linux sql-server centos

0
推荐指数
1
解决办法
2万
查看次数

标签 统计

node.js ×3

centos ×1

clickhouse ×1

javascript ×1

linux ×1

mongodb ×1

php ×1

sql ×1

sql-server ×1