database.php 1019 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. return [
  3. 'default' => 'mysql',
  4. 'connections' => [
  5. 'mysql' => [
  6. 'driver' => env('DB_TYPE', 'mysql'),
  7. 'host' => env('DB_HOST', '127.0.0.1'),
  8. 'port' => env('DB_PORT', 3306),
  9. 'database' => env('DB_NAME', 'saiadmin'),
  10. 'username' => env('DB_USER', 'root'),
  11. 'password' => env('DB_PASSWORD', '123456'),
  12. 'charset' => env('DB_CHARSET', 'utf8mb4'),
  13. 'collation' => env('DB_COLLATION', 'utf8mb4_general_ci'),
  14. 'prefix' => env('DB_PREFIX', ''),
  15. 'strict' => true,
  16. 'engine' => null,
  17. 'options' => [
  18. PDO::ATTR_EMULATE_PREPARES => false, // Must be false for Swoole and Swow drivers.
  19. ],
  20. 'pool' => [
  21. 'max_connections' => 5,
  22. 'min_connections' => 1,
  23. 'wait_timeout' => 3,
  24. 'idle_timeout' => 60,
  25. 'heartbeat_interval' => 50,
  26. ],
  27. ],
  28. ],
  29. ];