hello,
It is possible to call manticore with pure sphinxql query from NodeJs? Here is my config : searchd {
listen = 9306:mysql41
query_log_format = sphinxql
}
From NodeJs i use this config : // Configuration de la connexion Manticore
const manticoreConfig = {
host: ‘localhost’,
port: 9306,
user: ‘root’,
password: ‘’,
acquireTimeout: 60000,
timeout: 60000,
reconnect: true,
multipleStatements: true
};
After several test i have error like : code: ‘ER_NO_DB_ERROR’,
errno: 1046,
sqlMessage: 'no such database ',
sqlState: ‘42000’,
fatal: true
Two points I can think, 'no such database ’ makes it seem like you’ve connected to a mysql server, not searchd
Make sure your mysql client library supports port.
… but have also seen some that ‘ignore’ the port and use a pipe to connect to mysql, if it can. Typically only happens with host set to localhost.
so try host: '127.0.0.1', - which may help make sure it uses TCP and hence uses port!
Otherwise the client may be trying to et a database, which is not something supported in manticore. Check if can log the queries your client is trying to make. might then be able to spot somethings to turn of.
(ie some clients run a bunch of commands auotmatically on startup, to ‘setup’ the connection. they may blindly assume mysql, and not account for it been searchd server!)
Thanks, i tried mysql and mysql2 modules in Nodejs (also with 127.0.0.1) , no chance to make the connection work. Everything work fine with “mysql -h localhost -P 9306”
if you follow all steps Installation > Installation | Manticore Search Manual and install manticore-extra and got the buddy running it could fix that reqests unhandled by daemon and provide dummy reply to your client
Thanks for your answers finaly i used NodeJs (api endpoints) and python (for mantricore query call), no way to make all the machnism work inside Nodejs (mysql module does not work)