In Kohana 3, Save session in database

Session usage for native or database adapter is same. Just follow the below 2 steps on saving database session and you’re done.

1] Create database-based session table:

CREATE TABLE IF NOT EXISTS `sessions` (
     `session_id` VARCHAR( 24 ) NOT NULL,
     `last_active` INT UNSIGNED NOT NULL,
     `contents` TEXT NOT NULL,
     PRIMARY KEY ( `session_id` ),
     INDEX ( `last_active` )
) ENGINE = MYISAM;


2] Write the below code under in your bootstrap.php file

     // -- Configuration and initialization ---------
     Session::$default = 'database';

That’s it! Read more about database session in Kohana Koseven.