How to change magento 2 admin password from database

As we know Magento database are very complex, so not easy to change Magento 2 admin password from database.
I am going to explain short technique how to change Magento 2 admin password from database.
Open admin_user table from database and paste this query on sql editor.
Please read below instruction before paste query.
Please make sure your admin username is admin or anything else, change username = ‘admin’ if admin username is not admin.
After fire this query your admin password will be set admin123. Replace admin123 if you want to set another.
Please make sure not included any space between random character and new password.

UPDATE mg_admin_user SET password = CONCAT(SHA2(‘abcdefghadmin123’, 256), ‘:abcdefgh:1’) WHERE username = ‘admin’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s