Locking User Accounts in MySQL
For SOX Compliance when an employee, contractor, or vendor leaves
your company their account needs to be locked, expired, or
removed. Some of these people may return, and their Account
may have many complicated permissions. In these cases, it
would be better to “Lock” their Account while they are no longer
doing business with your company.
However, MySQL does not have the ability to “Lock” or “Expire” a
User Account. The following is a simple procedure to
“Lock” and “Unlock” a MySQL Account.
Typically, the one-way encrypted hash value of a users password
is stored in a password field in an user account
table. MySQL supports three builtin one-way hashed
functions, PASSWORD(), MD5() and SHA1(). It is recommended
not to directly use the PASSWORD() function. Reason, is that
prior to PHP 4.1 version, the …