Bug #9736 DISABLE USER
| Submitted: | 7 Apr 2005 22:25 | Modified: | 15 Dec 2010 9:57 |
|---|---|---|---|
| Reporter: | Carsten Pedersen | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S4 (Feature request) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any |
[7 Apr 2005 22:25]
Carsten Pedersen
[7 Apr 2005 22:28]
Carsten Pedersen
Feature request, not a bug
[24 Nov 2008 9:32]
Hans Ginzel
I vote for this feature.
[19 Mar 2009 15:00]
Carlos Hernandez
what about this feature?
[20 Apr 2009 9:40]
Andy Pieters
I vote for this feature too!
[8 Dec 2010 5:08]
prasad chowdary
Yes, it's more useful to have Enable/Disable user a/c's -Guru Nutheti
[16 May 2012 6:20]
Dan Kloke
Here's a workaround I use:
- create a separate table for disabled users:
create table mysql.users_off like mysql.users;
- copy selected accounts to a separate tables:
replace into table mysql.users_off select * from mysql.users where user like ('Bob',Steve');
- drop the regular account records:
delete from mysql.users where user like ('Bob',Steve');
flush privileges;
- restore when needed:
insert ignore into mysql.users select * from mysql.users_off where user like ('Bob',Steve');
flush privileges;
delete from mysql.users_off where user like ('Bob',Steve');
Use additional tables if you need to save/delete/restore table privileges (mysql.tables_priv), column privileges (mysql.columns_priv), and procedure privileges (procs_pirv), although my experience on 5.1 has been that these records will not be removed if the user table records are dropped manually.
The remove and restore sequences can be placed into stored procedures for convenient use.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
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.