thanks for akond, the actual issue looks like i have do a factory creation of the db object in the service manager config. So i have to add the following line to the db.local.php
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
),
),
full working code for the configuration is below,
return array(
'db' => array(
'driver' => 'Mysqli',
'username' => 'xxx',
'password' => 'xxx',
'database' => 'xxxx',
'host' => 'localhost'
),
'service_manager' => array(
'factories' => array(
'translator' => 'MvcTranslator',
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
),
'aliases' => array(
'db' => 'Zend\Db\Adapter\Adapter',
),
),
);