Skip to content

Instantly share code, notes, and snippets.

@makamo
Created March 2, 2015 15:35
Show Gist options
  • Save makamo/bf6e6683d2303667a923 to your computer and use it in GitHub Desktop.
Save makamo/bf6e6683d2303667a923 to your computer and use it in GitHub Desktop.
/**
* Connection information used by the ORM to connect
* to your application's datastores.
*/
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/*
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'nonstandard_port_number',
'username' => 'root',
'password' => '123',
'database' => 'timesheets',
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,
/*
* Set identifier quoting to true if you are using reserved words or
* special characters in your table or column names. Enabling this
* setting will result in queries built using the Query Builder having
* identifiers quoted when creating SQL. It should be noted that this
* decreases performance because each query needs to be traversed and
* manipulated before being executed.
*/
'quoteIdentifiers' => false,
/*
* During development, if using MySQL < 5.6, uncommenting the
* following line could boost the speed at which schema metadata is
* fetched from the database. It can also be set directly with the
* mysql configuration directive 'innodb_stats_on_metadata = 0'
* which is the recommended value in production enviroments
*/
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
],
/**
* The test connection is used during the test suite.
*/
'test' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
//'port' => 'nonstandard_port_number',
'username' => 'root',
'password' => '123',
'database' => 'test',
'prefix' => false,
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,
'quoteIdentifiers' => false,
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
],
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment