respectively—and other values associated with the user we explain the other parameters that can beset for users later.
Let’s consider an example. Suppose you issue the statement:
mysql>
GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON *.* -> TO 'fred'@'localhost' IDENTIFIED BY '4fgh6!aa';Query OK, 0 rows affected (0.19 sec)
This creates a row in the User table of the mysql database.
Select this database, and
list the table rows for fred; here’s
the output, modified so that it fits on this page:
mysql>
USE mysqlDatabase changed mysql>
SELECT * FROM user WHERE User = 'fred';+-----------+------+-------------------------------------------+-------------+...
| Host | User | Password | Select_priv |...
+-----------+------+-------------------------------------------+-------------+...
| localhost | fred | *8325B39F81993E24AC6802CD33722DB8B1D64C21 | Y |...
+-----------+------+-------------------------------------------+-------------+...
...+-------------+-------------+-------------+-------------+-----------+...
...| Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv |...
...+-------------+-------------+-------------+-------------+-----------+...
...| Y | Y | Y | N | N |...
...+-------------+-------------+-------------+-------------+-----------+...
...+-------------+---------------+--------------+-----------+------------+...
...| Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv |...
...+-------------+---------------+--------------+-----------+------------+...
...| N | N | N | N | N |...
...+-------------+---------------+--------------+-----------+------------+...
...+-----------------+------------+------------+--------------+------------+...
...| References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv |...
...+-----------------+------------+------------+--------------+------------+...
...| N | N | N | N | N |...
...+-----------------+------------+------------+--------------+------------+...
...+-----------------------+------------------+--------------+...
...| Create_tmp_table_priv | Lock_tables_priv | Execute_priv |...
...+-----------------------+------------------+--------------+...
...| NY N |...
...+-----------------------+------------------+--------------+...
...+-----------------+------------------+------------------+----------------+...
...| Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv |...
...+-----------------+------------------+------------------+----------------+...
...| N | N | N | N |...
...+-----------------+------------------+------------------+----------------+...
...+---------------------+--------------------+------------------+----------+...
...| Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type |...
...+---------------------+--------------------+------------------+----------+...
...| N | N | N | |...
...+---------------------+--------------------+------------------+----------+...
...+------------+-------------+--------------+---------------+-------------+...
...| ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates |...
...+------------+-------------+--------------+---------------+-------------+...
...| | | | 0 | 0 |...
...+------------+-------------+--------------+---------------+-------------+...
...+-----------------+----------------------+
Share with your friends: