Answer the question
In order to leave comments, you need to log in
Where do I get error while working with yii2-sphinx?
I use this solution:
https://github.com/yiisoft/yii2-sphinx/
Installed via composer, everything is ok.
In the config it is:
'sphinx' => [
'class' => 'yii\sphinx\Connection',
'dsn' => 'mysql:host=127.0.0.1;port=9306;',
'username' => '',
'password' => '',
],
searchd
{
listen = 9312
listen = 9306:mysql41
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinx/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinx/
}
use yii\sphinx\Query;
$query = new Query;
$rows = $query->select('id, price')
->from('idx_item')
->andWhere(['group_id' => 1])
->all();
Database Exception - yii\db\Exception
SQLSTATE[HY000] [2002] Connection refused
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question