database.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2. return array
  3. (
  4. 'default' => array
  5. (
  6. 'type' => 'MySQL',
  7. 'connection' => array(
  8. /**
  9. * The following options are available for MySQL:
  10. *
  11. * string hostname server hostname, or socket
  12. * string database database name
  13. * string username database username
  14. * string password database password
  15. * boolean persistent use persistent connections?
  16. * array variables system variables as "key => value" pairs
  17. *
  18. * Ports and sockets may be appended to the hostname.
  19. */
  20. 'hostname' => 'localhost',
  21. 'database' => 'kohana',
  22. 'username' => FALSE,
  23. 'password' => FALSE,
  24. 'persistent' => FALSE,
  25. ),
  26. 'table_prefix' => '',
  27. 'charset' => 'utf8',
  28. 'caching' => FALSE,
  29. ),
  30. 'alternate' => array(
  31. 'type' => 'PDO',
  32. 'connection' => array(
  33. /**
  34. * The following options are available for PDO:
  35. *
  36. * string dsn Data Source Name
  37. * string username database username
  38. * string password database password
  39. * boolean persistent use persistent connections?
  40. */
  41. 'dsn' => 'mysql:host=localhost;dbname=kohana',
  42. 'username' => 'root',
  43. 'password' => 'r00tdb',
  44. 'persistent' => FALSE,
  45. ),
  46. /**
  47. * The following extra options are available for PDO:
  48. *
  49. * string identifier set the escaping identifier
  50. */
  51. 'table_prefix' => '',
  52. 'charset' => 'utf8',
  53. 'caching' => FALSE,
  54. ),
  55. );