database.php.default 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. namespace App\Config;
  22. /**
  23. * In this file you set up your database connection details.
  24. *
  25. * @package cake.config
  26. */
  27. /**
  28. * Database configuration class.
  29. * You can specify multiple configurations for production, development and testing.
  30. *
  31. * datasource => The name of a supported datasource; valid options are as follows:
  32. * Database/Mysql - MySQL 4 & 5,
  33. * Database/Sqlite - SQLite (PHP5 only),
  34. * Database/Postgres - PostgreSQL 7 and higher,
  35. * Database/Sqlserver - Microsoft SQL Server 2005 and higher
  36. *
  37. * You can add custom database datasources (or override existing datasources) by adding the
  38. * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
  39. *
  40. *
  41. * persistent => true / false
  42. * Determines whether or not the database should use a persistent connection
  43. *
  44. * host =>
  45. * the host you connect to the database. To add a socket or port number, use 'port' => #
  46. *
  47. * prefix =>
  48. * Uses the given prefix for all the tables in this database. This setting can be overridden
  49. * on a per-table basis with the Model::$tablePrefix property.
  50. *
  51. * schema =>
  52. * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'.
  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. }