Drupal User Blocked in D7

How to reset user after being blocked (d7 and works in D8 as well).

1MySQL> delete from flood where identifier=<uid>;

To get the uid, search as follows:

1MySQL> select uid, name from users where name like '%NameHere%'\G;

Details in https://www.drupal.org/node/1023440

NOTE: Observed to work as well in D8 with some adjustments to checking the uid which seems to be in users_data already.