I've forgot my admin username and password. what should i do, please help. when i click forgot password. and after enter email address. I've not get email on my gmail account, because of magento is being installed on my local server xampp. what should i do?.
If you are having troubles and want to reset it to a different password, just run at your sql database:
SELECT * FROM admin_user;
Then, find the username you want to modify in the listing provided - ‘admin’ in this example.
Then, to update the password, type:
UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';
‘qX’ would be changed to whatever you want it to be and same goes for ‘password’
You can also do this in phpMyAdmin, find the admin_user field and choose MD5 when updating password.
If you want to add a new admin user, you must not only create a new entry in the table ‘admin_user’, but you also have to insert an entry in the table ‘admin_role’ which has to be associated with the user by the field ‘user_id’
This process works in Magento 1.9 In order to change a preexistent administrator's password from the command-line, for SSH connections, you must open the /app/etc/local.xml to recover the connection information.
Once you have the database name, the username and password and table prefix you can connect to mysql server by:
mysql -u<username> -p<password> <database name>, substituting
<variable> by the actual value recovered from the file.
Next you can retrieve your username in case you've also forgot it.
select username from <table prefix>admin_user, will give you the existing administrators. Remember that if table prefix is, for instance, "magento" then you must add a preceding underscore to admin user (i.e. magento_admin_user).
Updating the password is done by an update
update <table prefix>admin_user set password=concat(md5(concat("12",'your-desired-password')),":12") where username="<your username>"
Please observe that "12" is salt. Salt is a cryptography mechanism to add security to a cipher. In this case, the salt adds security to your desired password.
In Magento, the admin password uses a two character salt. The salt is concatenated at the beggining of your desired password. The result string is then ciphered and the resulting cipher has the salt appended. The code I presented earlier does this process.
Its so simple don't ever worry about it. Just register as new user / customer from the front end of the website with your own choice of password and remember it. If you have access to the PHPMYADMIN select your database go to this table "customer_entity_varchar". The copy the value last before row and next to your register user middle name. That must be your encrypted customer password. Copy the complete of the column. Then now go to your admin_user table and password this password text to the admin password column. That's it now try to login to your magento admin using your admin username and the newly created customer password. Have fun.....