Granting Privileges:
GRANT SELECT ON karad.emp TO scott@localhost;
GRANT ALL PRIVILEGES ON karad.emp TO scott@localhost;
GRANT INSERT ON karad.emp TO scott@localhost, king@localhost;
GRANT SELECT, INSERT ON karad.emp TO scott@localhost, king@localhost;
GRANT SELECT ON karad.emp TO PUBLIC;
Checking Privileges:
SELECT * FROM information_schema.table_privileges;
Revoking Privileges:
REVOKE SELECT ON karad.emp FROM scott@localhost;
MySQL v9 has 78 system tables
These are automatically created when MySQL is installed.
System tables are stored in information_schema
USE information_schema;
SHOW TABLES;
System tables store complete information about the database, such as:
The set of 78 system tables is known as the Database Dictionary (also called the Database Catalog).
STATISTICS
(for indexes)TABLE_CONSTRAINTS
KEY_COLUMN_USAGE
TABLE_PRIVILEGES
SELECT
from system tables.INSERT
, UPDATE
, or DELETE
.mysql.sys