database_template.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. return [
  3. // 数据库类型
  4. 'type' => 'mysql',
  5. // 服务器地址
  6. 'hostname' => '127.0.0.1',
  7. // 数据库名
  8. 'database' => '',
  9. // 用户名
  10. 'username' => '',
  11. // 密码
  12. 'password' => '',
  13. // 端口
  14. 'hostport' => '3306',
  15. // 连接dsn
  16. 'dsn' => '',
  17. // 数据库连接参数
  18. 'params' => [],
  19. // 数据库编码默认采用utf8
  20. 'charset' => 'utf8',
  21. // 数据库表前缀
  22. 'prefix' => '5kcrm_', // 默认表前缀,不要改为其他值。
  23. // 数据库调试模式
  24. 'debug' => true,
  25. // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
  26. 'deploy' => 0,
  27. // 数据库读写是否分离 主从式有效
  28. 'rw_separate' => false,
  29. // 读写分离后 主服务器数量
  30. 'master_num' => 1,
  31. // 指定从服务器序号
  32. 'slave_no' => '',
  33. // 自动读取主库数据
  34. 'read_master' => false,
  35. // 是否严格检查字段是否存在
  36. 'fields_strict' => true,
  37. // 数据集返回类型
  38. 'resultset_type' => 'array',
  39. ];