Magento 1.9 sample data with no admin login

Today our team installed Magento 1.9 with sample data provided by Magento but the sample data provided by Magento didn’t have any admin login

So our team spent 30 mins to write a mysql script which we thought we must share with the community to save time for others.

Create Magento admin user

The below query helps generating MD5 salt password which you can use in the second query

This query creates Magento admin login using MD5 salt password created in the first query

This query associate adminstrator role with the Magento admin login created in the second query

Reset Password for Magento admin userThe below query helps generating MD5 salt password which you can use in the second query

This query reset Magento admin password using MD5 salt password created in the first query

N.B – In both scenerios above, the username is scommerce.mage and password is Password

That’s it, it is as simple as that. Hope this article helped you in some way.