When I do this step on marco pivetta tutorial Validate-schema I have this error :
[PDOException]
SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES)
The problem is, on line command i think my doctrine.local.php
return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'driverClass' =>'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => '3306',
'user' => 'root',
'password' => '',
'dbname' => 'test',
'charset' => 'utf8',
'driverOptions' => array (1002 => 'SET NAMES utf8'),
)
)
)
)
);
is not loaded for this tool. My $params is empty (Doctrine\DBAL\Driver\PDOMySql\Driver) And _constructPdoDsn return standard $dsn, not my configs params.
My Os is windows 7 I'm working with Zend Framework2 on wamp and I use Console2 with gitBash for command line.
I'm stuck any help please ?
I found solution....
On windows seven, we have to use this line command (or we can also do this command via index.php in public dir since zf2 2.3.0)
And, if you use gitBash don't forget if you have tested your APPLICATION_ENV variable in application.config.php like this tutorial Zf2 advances config setup do in bash_profile file :
Hope this help someone. You don't need to have cli-config.php in the root directory to do that.
You need to have
cli-config.php
in your root.Here is content of mine: