PrivilegeApplicationGDTCINDEX
The CREATE INDEX
and DROP INDEX
statements.
✓
✓
✓
✗
INSERT
The
INSERT
statement.
✓
✓
✓
✓
LOCK TABLES
The
use of LOCK TABLESand UNLOCK TABLES. Must have
SELECT
privilege for the tables. Since this is a database-wide privilege, it
can only be granted using the database_name.*
(or
*.*
) format.
✓
✓
✗
✗
PROCESS
The use of
SHOW
FULL
PROCESSLIST
✓
✗
✗
✗
RELOAD
The use of FLUSH (discussed later in this chapter in “Managing
Privileges with SQL”).
✓
✗
✗
✗
REPLICATION
CLIENT
Controls whether you can see where master and slave servers are.
✓
✗
✗
✗
REPLICATION
SLAVE
Controls whether slaves can read the master binary log.
✓
✗
✗
✗
SELECT
The use of SELECT, allowing data to be read from the specified table(s).
✓
✓
✓
✓
SHOW DATABASES
Controls whether
all databases are shown with SHOW
DATABASES
✓
✗
✗
✗
SHUTDOWN
Controls whether the server can be shutdown with the mysqladmin shutdown command.
✓
✗
✗
✗
SUPER
The use of the CHANGE MASTER, KILL, PURGE MASTER
LOGS
,
SET GLOBAL, and the mysqladmin debug commands.
✓
✗
✗
✗
UPDATE
The use of
UPDATE
to modify existing data in the specified table(s).
✓
✓
✓
✓
USAGE
No privileges not explicitly allowed to do anything other than connect to the server. Used when creating an account or updating details.
✓
✓
✓
✓
Table 9-2 shows what the
ALL
option means at the global,
database, and table levels.
For example, the second column shows what happens when you GRANT ALL ON to a user. All privileges listed with a checkmark (
✓) are given to the user, and those with across) are omitted. The GRANT OPTION
—which allows a user to pass on his privileges to another user—isn’t available for
ALL
at
any level, and therefore must be granted explicitly. We discuss it next.
Table 9-2. Simple privileges that comprise the ALL privilege at different levelsShare with your friends: