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

Code Example 1

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

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 mydb.* TO 'myuser'@'%' WITH GRANT OPTION;

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

Learn ReactJs, React Native from akashmittal.com