This is documentation for Kohana v2.3.x. For v3.x documentation, see http://kohanaframework.org/guide .
To configure the database there should be a file database.php in your application/config directory. If it isn't there you should copy it from the system/config directory. It will look something like this:
$config['default'] = array ( 'benchmark' => TRUE, 'persistent' => FALSE, 'connection' => array ( 'type' => 'mysql', 'user' => 'dbuser', 'pass' => 'p@ssw0rd', 'host' => 'localhost', 'port' => FALSE, 'socket' => FALSE, 'database' => 'kohana' ), 'character_set' => 'utf8', 'table_prefix' => '', 'object' => TRUE, 'cache' => FALSE, 'escape' => TRUE );
benchmarkis used to enable or disable benchmarking
persistentis used to enable or disable a persistent connection
connectionarray of specific parameters or supply a valid DSN identifier in the format: driver://user:password@server_or_socket/database
character_setwhich character_set to use
table_prefixthe table prefix to use for your tables, if any
objectif set to TRUE, database results return objects by default, otherwise they return arrays.
cacheenable or disable the query cache
escapeenable or disable automatic query builder escaping
You can have as many $config entries as you need. Each one needs a unique group identifier. You can use multiple config groups to connect to different databases in the same application.
The database library provides database access to your application using drivers.
Currently we have the following drivers available: