Magento 1.9 – How to Update Customer Password Directly in Database

customer-attributedatabasemagento-1.9password

If I have access to my database, can I manually override a customer password? This is my local development environment.

I have little knowledge of password encryption but I would like to be able to log out on a previously setup customer account and my forgot password link is not working.

As far as I can see this is stored in the customer_entity_varchar table.

Best Answer

Try this:

Replace testtest with your new password and $customer_entity_id with the customers entity_id in the customer_entity table.

update customer_entity_varchar set value = md5('testtest') where entity_id=$customer_entity_id and attribute_id in (select attribute_id from eav_attribute where attribute_code = 'password_hash' and entity_type_id = 1);
Related Topic