Open CarlosGarcell opened 8 years ago
I'm having the same issue. I found that when I update line 26 to this:
$this->_raw_mysql_connection = mysqli_connect(
\Config::get('sphinxsearch.mysql_server.host'),
\Config::get('sphinxsearch.mysql_server.username'),
\Config::get('sphinxsearch.mysql_server.passwd'),
\Config::get('sphinxsearch.mysql_server.dbname'),
\Config::get('sphinxsearch.mysql_server.port'));
and added this to my config/sphinxsearch.php
'mysql_server' => array(
'host' => env('DB_HOST'),
'port' => env('DB_PORT'),
'username' => env('DB_USERNAME'),
'dbname' => env('DB_DATABASE'),
'passwd' => env('DB_PASSWORD'),
)
it worked and I can query the model with relationships.
Why is it that the DB name and password are left blank on the mysqli connection function call, instead of them being set as blank on the config file? This would make changing the DB connection parameters a lot easier