Hello friends, Sometimes we forgot admin password and then we are stuck. In that case we can change the admin password using below sql query.
Before that we need to understand how the password is stored in magento. Magento stores admin password by concatenating two string:
1) one is randomly generated string having two alphabets one in capital letters and another in small letters like: aU, gE etc.
2) Password and the randomly generated string in MD5 format. For example if we want to use 'admin123' as password then string will be 'aUadmin123'.
Magento concatenate both two strings and stores it. Admin details are stored in admin_user table so we have to use update query on admin_user table.
Now we know about that how magento stores password it will be easy for us to create an update query.
That's all, now you can easily change your admin password.
Author: Mohit Verma
Before that we need to understand how the password is stored in magento. Magento stores admin password by concatenating two string:
1) one is randomly generated string having two alphabets one in capital letters and another in small letters like: aU, gE etc.
2) Password and the randomly generated string in MD5 format. For example if we want to use 'admin123' as password then string will be 'aUadmin123'.
Magento concatenate both two strings and stores it. Admin details are stored in admin_user table so we have to use update query on admin_user table.
Now we know about that how magento stores password it will be easy for us to create an update query.
Update 'admin_user' set password= CONCAT(MD5( 'aUadmin123') , ':aU') where username = 'admin';
That's all, now you can easily change your admin password.
Author: Mohit Verma
Comments
Post a Comment