Reset a user's login count from the database in Jira server
Symptoms
When trying to gain access to a system, it is possible that you are getting hit with a CAPTCHA, but do not have access to the admin UI to reset this.
Resolution
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
Option 1:
Run this SQL query and see the login attempt count for USERNAME:
select * from cwd_user_attributes where user_id = (select id from cwd_user where user_name = 'USERNAME');
And Run the following UPDATE queries to effectively alter the count to '0':
update cwd_user_attributes set attribute_value = '0' where user_id = (select id from cwd_user where user_name = 'USERNAME') and attribute_name = 'login.totalFailedCount';
update cwd_user_attributes set attribute_value = '0' where user_id = (select id from cwd_user where user_name = 'USERNAME') and attribute_name = 'login.currentFailedCount';
This syntax was only tested on PostgreSQL
Option 2: