Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database connection parameters #16

Open
CarlosGarcell opened this issue Oct 12, 2016 · 1 comment
Open

Database connection parameters #16

CarlosGarcell opened this issue Oct 12, 2016 · 1 comment

Comments

@CarlosGarcell
Copy link

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

@dingman
Copy link

dingman commented Nov 27, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants