I tried to use thinking sphinx (3.0.2) with remote sphinx server. whenever search query is called like Model.search, I am getting the error:
Mysql2::Error: Lost connection to MySQL server at 'reading initial communication packet', system error: 0.
When I tried to debug it,
Mysql2::Client.new({
:host => address,
:port => port,
:flags => Mysql2::Client::MULTI_STATEMENTS
}
code is called in thinking-sphinx-3.0.2/lib/thinking_sphinx/connection.rb:5
5 with port specified in thinking_sphinx.yml.
When I tried that code in console, I am getting the same error. How can I solve it? Is it related to mysql or sphinx or thinking_sphinx?
FYI:
- rails(3.2.8) , thinking-sphinx (3.0.2), sphinx (2.0.5)
- sphinx, mysql are in same remote server