在此处浏览多个线程以确定发生这种情况的原因之后,我没有运气,并想知道 WAMPservers MySQL 是否以某种方式奇怪地配置到 my.ini 文件中的 old_password=0 等命令的位置(显然 WAMPserver 没有使用 my.cnf?),并使用 SET password=PASSWORD('your current password'); 重建密码 不工作。
有没有人使用 WAMPserver 遇到过这样的问题,如果是这样,有没有找到解决方案?如果有帮助,请使用最新版本的 WAMPserver、mysql 5.5、PHP 5.3.10
编辑:尝试了以下发布的解决方案,但没有成功。我在屏幕上得到以下响应。
SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
#0 /usr/local/www/apache24/data/webApp/app/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /usr/local/www/apache24/data/webApp/app/lib/Varien/Db/Adapter/Pdo/Mysql.php(251): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /usr/local/www/apache24/data/webApp/app/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /usr/local/www/apache24/data/webApp/app/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /usr/local/www/apache24/data/webApp/app/lib/Varien/Db/Adapter/Pdo/Mysql.php(340): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Resource.php(93): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#7 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(297): Mage_Core_Model_Resource->getConnection('core_read')
#8 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(312): Mage_Core_Model_Mysql4_Abstract->_getConnection('read')
#9 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Mysql4/Cache.php(41): Mage_Core_Model_Mysql4_Abstract->_getReadAdapter()
#10 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Cache.php(434): Mage_Core_Model_Mysql4_Cache->getAllOptions()
#11 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Cache.php(469): Mage_Core_Model_Cache->_initOptions()
#12 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/App.php(1144): Mage_Core_Model_Cache->canUse('config')
#13 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Config.php(437): Mage_Core_Model_App->useCache('config')
#14 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/Config.php(310): Mage_Core_Model_Config->_canUseCacheForInit()
#15 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/App.php(395): Mage_Core_Model_Config->loadModulesCache()
#16 /usr/local/www/apache24/data/webApp/app/app/code/core/Mage/Core/Model/App.php(329): Mage_Core_Model_App->_initModules()
#17 /usr/local/www/apache24/data/webApp/app/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#18 /usr/local/www/apache24/data/webApp/app/index.php(193): Mage::run('', 'store')
#19 {main}
已执行错误消息中发布的建议操作,并确认已确认 PDO 对 Mysql 的支持。