after installing magento in my local machine I for

2019-03-08 15:06发布

after installing magento in my local machine I forgot admin password what I have given. I am not able to login to my admin area how can I reset the password

I have read this article http://www.atwix.com/magento/reset-admin-password-mysql/ but it is not working for me. Or may be I am not getting this

please help me am a beginner of Magento

15条回答
一纸荒年 Trace。
2楼-- · 2019-03-08 15:43

This solution work for all versions of Magento.

Add temporally this at end of index.php

$user = Mage::getModel('admin/user')->loadByUsername('your_username');
$user->setPassword('new_password');
$user->save();

And your new_password was saved. Now remove 3 lines at the end of index.php.

Have a nice day.

查看更多
仙女界的扛把子
3楼-- · 2019-03-08 15:46

The cleanest way to fix this issue is to reset the Magento installation; be sure you keep details of your database credentials in a safe place:

  1. Delete local.xml in app\etc
  2. Delete \var\cache content
  3. Delete \var\session content
  4. Run the installation script in the browser with http://yourdomain/index.php
  5. Run the first screen (Localization)
  6. In the second screen, enable "Skip Base URL Validation Before the Next Step"
  7. Clean browser cache and cookies

Works 100% of the times.

查看更多
做个烂人
4楼-- · 2019-03-08 15:47

If you have access to phpMyAdmin, here are the steps to reset your password.

First, open up phpMyAdmin. Click on your database name for Magento from the sidebar on the left. Click on the SQL tab and type the following in to the text box:

UPDATE `admin_user` SET `password` = MD5('PASSWORD') WHERE `username` = 'USERNAME';

You’ll want to replace the capitalized values with the correct information:

USERNAME - The user whose password you’ll be udpating PASSWORD - The new password you want to use For example, if my username was admin and I wanted to reset the password to 123456, I would do this:

UPDATE `admin_user` SET `password` = MD5('123456') WHERE `username` = 'admin';

If you don’t know the name of the user you want to update, you can see all the users by clicking on the admin_user link from the sidebar, and then select the Browse tab. The username column has the list of available users.

查看更多
老娘就宠你
5楼-- · 2019-03-08 15:53

This would prove to be a good resource to read: http://www.magentocommerce.com/wiki/recover/resetting-admin-password

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’

查看更多
地球回转人心会变
6楼-- · 2019-03-08 15:53

Open phpMyAdmin and under open your database and under that find table "admin_user" and find your username in that table. Delete the password over there and create a new MD5 hash of your new password and place it there.

查看更多
\"骚年 ilove
7楼-- · 2019-03-08 15:56

Get List of Users:

*Note: Add your table prefix before table name.

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’.

查看更多
登录 后发表回答