I'm not sure you've asked the correct question, but I'll answer what you've asked.
Create a user@host where the host is the ip address or network you want to allow.
e.g
GRANT INSERT, UPDATE, SELECT DELETE on *.my_db to 'user'@'10.0.0.1' IDENTIFIED by 'your_password';
FLUSH PRIVILEGES;
Gives you one user at machine 10.0.0.1
or
code]
GRANT INSERT, UPDATE, SELECT, DELETE on *.my_db to 'user'@'10.0.0.%' IDENTIFIED by 'your_password';
FLUSH PRIVILEGES;
[/code]
Gives you one user on any machine 10.0.0.1 to 10.0.0.254.
See the refman.
http://dev.mysql.com/doc/refman/5.6/en/user-account-management.html
But if you want restrict users of YOUR APPLICATION which then uses mysql, then that is up to your application, and is a whole other kettle of fish. You'll need to google "php secure login" or something like that.
Good luck,
Barry.