Removing users in MySQL is an easy task, but there are some
drawbacks to check carefully before dropping a user. Not taking
these possible issues into consideration can render your
application unusable.
First it is important to understand the concept of user in MySQL.
A user has three main functions: authentication, privileges and
resources. This is different from other databases: in MySQL users
don’t own objects. An object belongs to a database and there is
no direct relationship between objects and users. This simplifies
the process of deleting a user because no objects will be erased.
But users, as I wrote before, have an associated set of
privileges that define what database sessions can do, and the
privileges applied both in stored programs and view execution.
At the same time, procedures, functions, triggers, and views have
two possible security contexts: invoker and definer. If they are
created using the invoker …
[Read more]