I am getting this error when I am accessing ORM in a script run from the command line:
Database_Exception [ 2 ]: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) ~ MODPATH/database/classes/kohana/database/mysql.php [ 67 ]
This is my directory structure
application
--bootstrap.php
modules
content
--index.php
system
This is my database config:
$database_config = array
(
'default' => array
(
'type' => 'mysql',
'connection' => array(
'hostname' => 'localhost',
'database' => 'driverslife',
'username' => 'root',
'password' => 'root',
'persistent' => FALSE,
'port' => 8889
),
'table_prefix' => '',
'charset' => 'utf8',
'caching' => FALSE,
'profiling' => TRUE,
),
);
When I echo MODPATH in the command line, it shows me the right path(slash appended). Is there anything I might be missing?