junaooaks 3 Denunciar post Postado Dezembro 24, 2014 configurar o banco de dados esta aparecendo o erro: 127.0.0.1:44744 [500]: / - Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)' in /var/www/html/zf2-inicio/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /var/www/html/zf2-inicio/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=loca...', 'root', '', Array) #1 /var/www/html/zf2-inicio/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(45): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=loca...', 'root', 'avvmnc102', Array) #2 /var/www/html/zf2-inicio/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'root', 'avvmnc102', Array) #3 /var/www/html/zf2-inicio/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): Doctrine\DBAL\Connection->connect() #4 /var/www/html/zf2-inicio/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabaseP in /var/www/html/zf2-inicio/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 1070 dentro de config/autoload/doctrine_orm.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' => 'inicio', 'driverOptions'=> array( PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES 'UTF8'" ), ), ), ), ), ); dentro de config/application.conf.php adicionei os modulos 'DoctrineModule', 'DoctrineORMModule', dentro do modulo cliente/config/module.config.php adicionei no final 'doctrine' => array( 'driver' => array( __NAMESPACE__ . '_driver' => array( 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', 'cache' => 'array', 'paths' => array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Entity') ), 'orm_default' => array( 'drivers' => array( __NAMESPACE__ . 'Entity' => __NAMESPACE__ . '_driver' ), ), ), ), ja criei a pasta Entity no modulo Compartilhar este post Link para o post Compartilhar em outros sites