我试图将我的脚本与Firebird中的数据库连接起来,但是我遇到了这个错误。
这是我的代码,我正在尝试连接我的本地数据库:
const Firebird = require('node-firebird');
var options = {};
options.host = '127.0.0.1';
options.port = 3050;
options.database = 'C:\\DATABASES\\PRUEBA.FDB';
options.user = 'SYSDBA';
options.password = 'password';
options.lowercase_keys = false; // set to true to lowercase keys
options.role = null; // default
options.pageSize = 4096;
Firebird.attach(options, (err, db) => {
if (err) console.log(err);
db.query('select * from temp', (err, response) => {
if (err) console.log(err);
console.log(response);
})
})错误是这样的,但我不知道会发生什么:
Incompatible wire encryption levels requested on client and server发布于 2021-04-30 00:53:23
当你使用Firebird 3,服务器或客户端都需要有线加密,而另一端(通常是客户端)禁用了有线加密时,就会出现这个错误“请求客户端和服务器的有线加密级别不兼容”。在本例中,您使用的是node-firebird,并且它不支持有线加密,并且总是reports it as disabled
blr.addBytes([CNCT_client_crypt, 4, WIRE_CRYPT_DISABLE, 0, 0, 0]); // WireCrypt = Disabled另一方面,Firebird 3的默认配置需要有线加密。为了进行连接,您需要将此设置从默认的Required放宽为Enabled (或Disabled,但这对于支持有线加密的应用程序的安全性较低)。
为此,您可以编辑服务器的firebird.conf,并修改或添加:
WireCrypt = Enabled然后重新启动Firebird服务器。
https://stackoverflow.com/questions/67321379
复制相似问题