database.php.default 2.7 KB

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