database.php.default 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * This is core configuration file.
  4. *
  5. * Use it to configure core behaviour of Cake.
  6. *
  7. * PHP 5
  8. *
  9. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  10. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @package app.Config
  18. * @since CakePHP(tm) v 0.2.9
  19. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  20. */
  21. /**
  22. * In this file you set up your database connection details.
  23. *
  24. * @package cake.config
  25. */
  26. /**
  27. * Database configuration class.
  28. * You can specify multiple configurations for production, development and testing.
  29. *
  30. * datasource => The name of a supported datasource; valid options are as follows:
  31. * Database/Mysql - MySQL 4 & 5,
  32. * Database/Sqlite - SQLite (PHP5 only),
  33. * Database/Postgres - PostgreSQL 7 and higher,
  34. * Database/Sqlserver - Microsoft SQL Server 2005 and higher
  35. *
  36. * You can add custom database datasources (or override existing datasources) by adding the
  37. * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
  38. *
  39. *
  40. * persistent => true / false
  41. * Determines whether or not the database should use a persistent connection
  42. *
  43. * host =>
  44. * the host you connect to the database. To add a socket or port number, use 'port' => #
  45. *
  46. * prefix =>
  47. * Uses the given prefix for all the tables in this database. This setting can be overridden
  48. * on a per-table basis with the Model::$tablePrefix property.
  49. *
  50. * schema =>
  51. * For Postgres/Sqlserver specifies which schema you would like to use the tables in. Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
  52. * the connected user's default schema (typically 'dbo').
  53. *
  54. * encoding =>
  55. * For MySQL, Postgres specifies the character encoding to use when connecting to the
  56. * database. Uses database default not specified.
  57. *
  58. * unix_socket =>
  59. * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
  60. */
  61. class DATABASE_CONFIG {
  62. public $default = array(
  63. 'datasource' => 'Database/Mysql',
  64. 'persistent' => false,
  65. 'host' => 'localhost',
  66. 'login' => 'user',
  67. 'password' => 'password',
  68. 'database' => 'database_name',
  69. 'prefix' => '',
  70. //'encoding' => 'utf8',
  71. );
  72. public $test = array(
  73. 'datasource' => 'Database/Mysql',
  74. 'persistent' => false,
  75. 'host' => 'localhost',
  76. 'login' => 'user',
  77. 'password' => 'password',
  78. 'database' => 'test_database_name',
  79. 'prefix' => '',
  80. //'encoding' => 'utf8',
  81. );
  82. }