0

我正在安装自定义 Zend 安装,当我在浏览器中访问 index.php 时出现此错误。

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] 
Access denied for user 'sitename'@'localhost' (using password: NO)' in
 /home3/sitename/public_html/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 
/home3/sitename/public_html/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO-
>__construct('mysql:host=loca...', '', '', Array) #1


/home3/sitename/public_html/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() 

#2 /home3/sitename/public_html/Zend/Db/Adapter/Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect() 

#3 /home3/sitename/public_html/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array) 

#4 /home3/sitename/application/bootstrap.php(65): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8') 

#5 /home3/sitename/public_html/Zend/Application/Bootstrap/BootstrapAbstract.php(665): Bootstrap->_initDB() 

#6 /home3/sitename/public_html/Zend/Application/Bootstrap/BootstrapAbstract.php(618): Zend_Application_Bootstrap_BootstrapAbstract- in /home3/sitename/public_html/Zend/Db/Adapter/Pdo/Abstract.php on line 144

任何帮助,将不胜感激。我相信我的目录结构是正确的,但是任何朝着正确方向的帮助都可以。

4

1 回答 1

0

检查您的 application.ini,位于 /application/configs

resources.db.adapter = "Pdo_Mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "database"
resources.db.params.charset = "utf8"
于 2013-07-05T14:06:20.013 回答