GRANT command not working in MySQL Server
Two points to add:


It is recommended to use another user other than root to connect to your DB in your application. Try to use root account for administration only. This can be good only on testing machines.
Don't forget to flush privileges for the changes to take effect. This is better than restarting mysql.