First you must login to MySQl as root
then select the database mysql
use mysql
Then apply the user and password to the database of your choice
Grant ALL PRIVILEGES ON database_name.* TO username@localhost IDENTIFIED BY "password";
This grants username access to all tables under database_name.
Now we have to update privileges for this user
update user SET Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', Index_priv='Y', Alter_priv='Y', Show_db_priv='Y', Super_priv='Y', Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', Repl_slave_priv='Y', Repl_client_priv='Y' WHERE User='username';
For security you should limit the 'Y' to Insert, Select, Update unless this is your super user.