Permission in Database?

GRANT and Revoke is the Data Contorl Language DCL command. It command is work upon permission Set. That basic privileges to the user for all tables of the specified database.

Grant Command

Grant common, basic privileges to the user for all tables of the specified database. It DCL command add permission for tables of the specified database. Grant set you can require a create user and created table and database .

Syntax
GRANT command,... ON database_name.table_name TO user@host;
Example
mysql> CREATE Database mydatabase;
Query OK, 1 row affected (0.00 sec)

mysql> USE mydatabase;
Database changed
mysql> CREATE Table mytable(
    -> id int
    -> );
Query OK, 0 rows affected (0.12 sec)

mysql> CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypassword';
Query OK, 0 rows affected (0.19 sec)

mysql> GRANT SELECT, INSERT, UPDATE ON mydatabase.mytable TO 'myuser'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql>
Revoke Command

Revoke common, basic privileges to the user for all tables of the specified database. It DCL command remove permission for tables of the specified database. Revoke set you can require a create user and created table and database .

Syntax
REVOKE command,... ON database_name.table_name FROM user@host;
Example
mysql> REVOKE SELECT,INSERT,UPDATE ON mydatabase.mytable FROM 'myuser'@'%';
Query OK, 0 rows affected (0.01 sec)

mysql> DROP User 'myuser';
Query OK, 0 rows affected (0.00 sec)

mysql>