I'm following the user guide tutorial directly from the Zend framewrok website; I create the module ALbum and the mysql table as the guide says, but when I open the link 'localhost:8080/album' return a page error with the message below :
Connect Error: SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'zf2tutorial'
I have also configurated the global.php and local.php as the guide says, in particular I have filled in the local.php this credential :
return array(
'db' => array(
'username' => 'root',
'password' => '',
),
);
because the 'zf2tutotial' database was inserted with the root user without password. Why the framework doesn't access the database ?
application.config.php
that you have written -'config/autoload/{,*.}{global,local}.php',
Thedb
array fromlocal.php
needs to be merged with the array fromglobal.php
. – Kunal Dethe