Privileges Provided by MySQL
577
• The
CREATE VIEW
[577]
privilege enables use of
CREATE VIEW
. This privilege was added in
MySQL 5.0.1.
• The
DELETE
[577]
privilege enables rows to be deleted from tables in a database.
• The
DROP
[577]
privilege enables you to drop (remove) existing databases and tables. If you grant
the
DROP
[577]
privilege for the
mysql
database to a user, that user can drop the database in
which the MySQL access privileges are stored.
• The
EXECUTE
[577]
privilege is required to execute stored routines (procedures and functions).
This privilege was added in MySQL 5.0.0 but did not become operational until MySQL 5.0.3.
• The
FILE
[577]
privilege gives you permission to read and write files on the server host using the
LOAD DATA INFILE
and
SELECT ... INTO OUTFILE
statements and the
LOAD_FILE()
[890]
function. A user who has the
FILE
[577]
privilege can read any file on the server host that is either
world-readable or readable by the MySQL server. (This implies the user can read any file in any
database directory, because the server can access any of those files.) The
FILE
[577]
privilege
also enables the user to create new files in any directory where the MySQL server has write access.
This includes the server's data directory containing the files that implement the privilege tables. As a
security measure, the server will not overwrite existing files.
To limit the location in which files can be read and written, set the
secure_file_priv
[490]
system
to a specific directory. See
Section 5.1.4, “Server System Variables”
.
• The
GRANT OPTION
[577]
privilege enables you to give to other users or remove from other users
those privileges that you yourself possess.
• The
INDEX
[577]
privilege enables you to create or drop (remove) indexes.
INDEX
[577]
applies
to existing tables. If you have the
CREATE
[576]
privilege for a table, you can include index
definitions in the
CREATE TABLE
statement.
• The
INSERT
[577]
privilege enables rows to be inserted into tables in a database.
INSERT
[577]
is also required for the
ANALYZE TABLE
,
OPTIMIZE TABLE
, and
REPAIR TABLE
table-
maintenance statements.
• The
LOCK TABLES
[577]
privilege enables the use of explicit
LOCK TABLES
statements to lock
tables for which you have the
SELECT
[578]
privilege. This includes the use of write locks, which
prevents other sessions from reading the locked table.
• The
PROCESS
[577]
privilege pertains to display of information about the threads executing within
the server (that is, information about the statements being executed by sessions). The privilege
enables use of
SHOW PROCESSLIST
or
mysqladmin processlist
to see threads belonging to
other accounts; you can always see your own threads.
• The
REFERENCES
[577]
privilege currently is unused.
• The
RELOAD
[577]
privilege enables use of the
FLUSH
statement. It also enables
mysqladmin
commands that are equivalent to
FLUSH
operations:
flush-hosts
,
flush-logs
,
flush-
privileges
,
flush-status
,
flush-tables
,
flush-threads
,
refresh
, and
reload
.
The
reload
command tells the server to reload the grant tables into memory.
flush-privileges
is a synonym for
reload
. The
refresh
command closes and reopens the log files and flushes
all tables. The other
flush-xxx
commands perform functions similar to
refresh
, but are more
specific and may be preferable in some instances. For example, if you want to flush just the log files,
flush-logs
is a better choice than
refresh
.
• The
REPLICATION CLIENT
[577]
privilege enables the use of
SHOW MASTER STATUS
and
SHOW
SLAVE STATUS
.
• The
REPLICATION SLAVE
[577]
privilege should be granted to accounts that are used by slave
servers to connect to the current server as their master. Without this privilege, the slave cannot
request updates that have been made to databases on the master server.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...