Grammer:
mysql> GRANT ALL PRIVILEGES ON *.* TO username@localhost
IDENTIFIED BY 'password' WITH GRANT OPTION;
Example:
mysql> GRANT ALL PRIVILEGES ON *.* TO username@localhost
IDENTIFIED BY 'password' WITH GRANT OPTION;
Example:
mysql> grant all privileges on *.* to 'foodmart'@'localhost' identified by 'foodmart';
Reference:
1. http://www.exampledepot.com/egs/java.sql/ConnectMySql.html