Check out example codes for "mysql grant". It will help you in understanding the concepts better.

Code Example 1

/*
The GRANT statement is used to assign full control over specific database by providing all priviledge.
Follow below statement for assign priviledge to user
*/

Syntax: 
GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%' WITH GRANT OPTION;

/*
I hope it will help you.
Namaste
*/

Code Example 2

/*
The GRANT statement is used to assign full control over specific database by providing all priviledge.
Follow below statement for assign priviledge to user
*/

Syntax: 
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';

Code Example 3

GRANT ALL ON *.* TO 'user'@'localhost';

GRANT GRANT OPTION ON *.* TO 'user'@'localhost';

Code Example 4

GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';

Code Example 5

GRANT UPDATE ON table_name TO 'username'@'localhost';

Code Example 6

if(curl_exec($ch) === false)
{
    echo 'Curl error: ' . curl_error($ch);
}
else
{
    echo 'Operation completed without any errors';

Learn ReactJs, React Native from akashmittal.com