September 2010
Intermediate to advanced
440 pages
9h 23m
English
As with creating databases and tables, the opposite of creating a user is to DROP. As we shall see, removing a user does not revert any changes that they have made to the database(s) to which they had access. If a user had the ability to create users, removing them will not remove the users they created.
Unlike databases and tables, dropping a user requires that you also specify the hostname of the user's record. Therefore, one cannot always enter:
DROP USER exemplar;
This will only work if the user was created without specifying the hostname.
If it exists, one must include the hostname. For best practice, the basic syntax is:
DROP USER <userid>@<hostname>;
Therefore to drop user exemplar, we would pass the following statement: ...
Read now
Unlock full access