AndyB
Well-known member
I have an add-on in which I'm trying to connect to a second database. Why is this PHP code not working?
I get the following error:
Access denied for user ''@'localhost' (using password: NO)
PHP:
$db = Zend_Db::factory('mysqli',
array(
'host' => $config['db']['localhost'],
'port' => $config['db']['3306'],
'username' => $config['db']['XXX'],
'password' => $config['db']['XXX'],
'dbname' => $config['db']['XXX']
)
);
$db->getConnection();
I get the following error:
Access denied for user ''@'localhost' (using password: NO)