I'm setting up a bank in Laravel 5.4, but the same is hosted on another server, set up in Navicat is accessing normally, but Laravel does not connect.
APP_NAME=Laravel
APP_ENV=local
APP_KEY=.........
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=banco
DB_USERNAME=root
DB_PASSWORD=
DB_CONNECTION=mysql_gps
DB_HOST=192.168.1.125
DB_PORT=3306
DB_DATABASE=meubanco
DB_USERNAME=root
DB_PASSWORD=senha
Database:
'mysql_gps' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '192.168.1.125'),
'port' => env('DB_PORT', '3306'),
'database' => 'meubanco',
'username' =>'root',
'password' => 'senha',
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
One of the banks I need to run local and the other remote.