less than 1 minute read

If you remember your password but the account is already locked you can unlock it at the database level. I have demonstrated this using MySQL.

The first step is to work out the user id that is locked, this statement will show you all the accounts that are locked:

SELECT id , name, email, status FROM users WHERE STATUS = "locked"; 

Find the user that you want to unlock and run the script ensuring you use the ID that is shown in the results above for the one you want to unlock. In the example below we are unlocking the user with id of 1.

Update users set status='active' where id="1";

Leave a comment