cancel
Showing results for 
Search instead for 
Did you mean: 

SQLSTATE[HY000] [1045] Access denied for user

SQLSTATE[HY000] [1045] Access denied for user

Hi all.

 

Very novice with programming.

 

I changed the password with our web host to the MySQL and we got booted from Magento backend.

 

Now when trying to get to the back end login back, we get the below. If anyone could help we would be very grateful as it is the biggest shopping weekend of the year.

 

There has been an error processing your request
SQLSTATE[HY000] [1045] Access denied for user 'maybebab_mage043'@'localhost' (using password: YES)
Trace: #0 /home3/maybebab/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /home3/maybebab/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 /home3/maybebab/public_html/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect() #3 /home3/maybebab/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array) #4 /home3/maybebab/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array) #5 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8') #6 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element)) #7 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write') #8 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write') #9 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter() #10 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(360): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter() #11 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection() #12 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Config.php(1348): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website)) #13 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Config.php(1380): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website)) #14 /home3/maybebab/public_html/app/Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website)) #15 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website)) #16 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection() #17 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/App.php(619): Mage_Core_Model_Abstract->getCollection() #18 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/App.php(477): Mage_Core_Model_App->_initStores() #19 /home3/maybebab/public_html/app/code/core/Mage/Core/Model/App.php(360): Mage_Core_Model_App->_initCurrentStore('', 'store') #20 /home3/maybebab/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array) #21 /home3/maybebab/public_html/index.php(83): Mage::run('', 'store') #22 {main}
6 REPLIES 6

Re: SQLSTATE[HY000] [1045] Access denied for user

Hi @forestavekids,

 

 

Since you updated the MySQL password, you have to update the credentials for Magento 2.

In order to do that, you have to modify the following file in your server:

 

app/env.php

There you have to replace the old database password with the new database password. Then you will be to access the website and the admin panel.

 

 

Best regards.

Gabriel

Welcome to the Magento Forums. Remember to introduce yourself and read the Magento Forums Guidelines.

Re: SQLSTATE[HY000] [1045] Access denied for user

This is Magento 1 installation. But the fundamental idea is sound nevertheless -- just that for Magento 1 edit app/etc/local.xml to update your database credentials.

Tanel Raja

Re: SQLSTATE[HY000] [1045] Access denied for user

Hello, I searched for this file could not find it anywhere, maybe I'm using a different version of yours, I use version 2.3.1

Re: SQLSTATE[HY000] [1045] Access denied for user

I am having same problem I am using 2.3.2


@rony_mattar wrote:

Hello, I searched for this file could not find it anywhere, maybe I'm using a different version of yours, I use version 2.3.1


 

Re: SQLSTATE[HY000] [1045] Access denied for user

Hi there, for Magento 2.3.x the file is at app/etc/env.php

 

Regards,
Dario

Re: SQLSTATE[HY000] [1045] Access denied for user

have you found solution for this buddy ??