Skip to content

Instantly share code, notes, and snippets.

@tangoslee
Created August 11, 2020 15:54
Show Gist options
  • Select an option

  • Save tangoslee/999bf867693fa249dff0385d630903ad to your computer and use it in GitHub Desktop.

Select an option

Save tangoslee/999bf867693fa249dff0385d630903ad to your computer and use it in GitHub Desktop.
Laravel MySQL Stream Connection
'mysql_stream' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ?
[
\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
] : [],
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment