title: sphinx connection error in php
body: <p>After a lot of tries and research i have successfully index the sphinx search, installed foolz package with the composer using putty but when I am trying to search in my php file it give me error "<code>Warning: mysqli::real_connect(): (HY000/2002): Connection refused in /var/www/html/vendor/foolz/sphinxql-query-builder/src/Connection.php on line 176</code>" below is the code that I am using for search. </p>
  
  <pre><code>require "vendor/autoload.php";
  use Foolz\SphinxQL\SphinxQL;
  use Foolz\SphinxQL\Connection;
  
  $conn = new Connection();
  $conn-&gt;setParams(array('host' =&gt; '127.0.0.1', 'port' =&gt; 3312));
  
  $query = SphinxQL::create($conn)-&gt;select('column_one', 'colume_two')
      -&gt;from('index_ancient', 'index_main', 'index_delta')
      -&gt;match('comment', 'my opinion is superior to yours')
      -&gt;where('banned', '=', 1);
  
  $result = $query-&gt;execute();
  </code></pre>
  
  <p>and I am unable to find my next step. this is the link that I am referring currently, <code>http://sphinxsearch.com/blog/2014/10/20/sphinxql-query-builder-for-php/</code>.
  Please help</p>