MySQL Forums
Forum List  »  Security

Disable All Logins
Posted by: David Paskiet
Date: September 25, 2020 10:10AM

I have upgraded to MySQL 5.7 and know that I can 'lockout' an account. I am having difficulties however accomplishing this task automatically. I need for a process to run completely before any user can log in. If they log in the process wil fail. So simplistically here is the need.

1. Kill all user connections sans root, backup, me
ALTER USER <user>@<host> ACCOUNT LOCK;
2. Lockout all users same as above
3. Run Process
4. Enable all users locked out in step 2.
ALTER USER <user>@<host> ACCOUNT LOCK;

Any help I could get here would be great. I am an experienced SQL Server developer and dba who is semi new to MySQL and am struggling a bit for these seemingly simple tasks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Disable All Logins
174
September 25, 2020 10:10AM
86
September 25, 2020 11:57AM
58
October 29, 2020 02:12AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.