1
Internally everyone is working, migrations
, tinker
, sqlite3
, but in the server application it always queries the mysql
instead of the sqlite
for all operations, ie he is using Connector.php
instead of SQLiteConnector.php
there is another type of configuration to connect with sqlite
?
.env
DB_CONNECTION=sqlite
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=./database/database.sqlite
#DB_USERNAME=homestead
#DB_PASSWORD=secret
database php.
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
Error
Queryexception SQLSTATE[HY000] [2002] No connection the p to be made because the target corner actively refused them.
put all the file
database.php
– novic
"but in the server application" what are you running there? are there any env var already defined? Env vars has priority under the file . env
– gmsantos
@Virgilionovic the file was not touched, only 'default' => env('DB_CONECNTION', 'sqlite') put in to see if it worked but it did not work
– Felipe Duarte
@gmsantos I don’t think I have because I started the server and nothing else, actually I will see what these env vars
– Felipe Duarte
post the exact error that is happening
– gmsantos
edited the question
– Felipe Duarte