2008-05-30 11:40:08 +00:00
<?php
/**
2017-06-10 21:33:55 +00:00
* @link https://cakephp.org CakePHP(tm) Project
2011-07-26 06:16:14 +00:00
* @package app.Config
2008-10-30 17:30:26 +00:00
* @since CakePHP(tm) v 0.2.9
2013-05-30 22:11:14 +00:00
*/
/**
2008-05-30 11:40:08 +00:00
* Database configuration class.
* You can specify multiple configurations for production, development and testing.
*
2011-11-04 22:07:31 +00:00
* datasource => The name of a supported datasource; valid options are as follows:
2013-10-23 02:18:59 +00:00
* Database/Mysql - MySQL 4 & 5,
* Database/Sqlite - SQLite (PHP5 only),
* Database/Postgres - PostgreSQL 7 and higher,
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
2008-05-30 11:40:08 +00:00
*
2011-11-04 22:07:31 +00:00
* You can add custom database datasources (or override existing datasources) by adding the
2012-12-22 22:48:15 +00:00
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
2011-03-16 04:14:37 +00:00
*
2008-05-30 11:40:08 +00:00
*
* persistent => true / false
* Determines whether or not the database should use a persistent connection
*
* host =>
2011-03-16 04:14:37 +00:00
* the host you connect to the database. To add a socket or port number, use 'port' => #
2008-05-30 11:40:08 +00:00
*
* prefix =>
2012-12-22 22:48:15 +00:00
* Uses the given prefix for all the tables in this database. This setting can be overridden
2008-05-30 11:40:08 +00:00
* on a per-table basis with the Model::$tablePrefix property.
*
* schema =>
2012-12-22 22:48:15 +00:00
* 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
2012-02-23 01:20:34 +00:00
* the connected user's default schema (typically 'dbo').
2008-05-30 11:40:08 +00:00
*
* encoding =>
2011-03-16 04:14:37 +00:00
* For MySQL, Postgres specifies the character encoding to use when connecting to the
* database. Uses database default not specified.
2008-05-30 11:40:08 +00:00
*
2011-09-16 08:07:22 +00:00
* unix_socket =>
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
2013-11-22 02:35:29 +00:00
*
2013-10-23 02:18:59 +00:00
* settings =>
* Array of key/value pairs, on connection it executes SET statements for each pair
2017-06-10 22:50:09 +00:00
* For MySQL : https://dev.mysql.com/doc/refman/5.6/en/set-statement.html
* For Postgres : https://www.postgresql.org/docs/9.2/static/sql-set.html
* For Sql Server : https://msdn.microsoft.com/en-us/library/ms190356.aspx
2013-11-22 02:35:29 +00:00
*
* flags =>
* A key/value array of driver specific connection options.
2008-05-30 11:40:08 +00:00
*/
class DATABASE_CONFIG {
2010-04-04 07:14:00 +00:00
public $default = array(
2011-03-16 04:14:37 +00:00
'datasource' => 'Database/Mysql',
2008-05-30 11:40:08 +00:00
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'database_name',
'prefix' => '',
2011-08-13 15:10:29 +00:00
//'encoding' => 'utf8',
2008-05-30 11:40:08 +00:00
);
2010-04-04 07:14:00 +00:00
public $test = array(
2011-03-16 04:14:37 +00:00
'datasource' => 'Database/Mysql',
2008-05-30 11:40:08 +00:00
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
2011-08-13 15:10:29 +00:00
//'encoding' => 'utf8',
2008-05-30 11:40:08 +00:00
);
}